Comments (5)
I changed only the lr value (1e-7), and it works well!! Thank you very much! 😄
from mlops-basics.
Hi @chloamme can you paste the training script also.
from mlops-basics.
This is the training script.
$ git clone https://github.com/graviraja/MLOps-Basics.git
$ cd MLOps-Basics/week_0_project_setup/
$ pip install -r requirements.txt
$ python train.py
$ ls -al ./models/epoch\=1-step\=535.ckpt
After I got a checkpoint, I edited the inference.py file using the name of the ckpt file I've obtained.
And I added a few more examples to inference on the model.
# inference.py
if __name__ == "__main__":
sentence = "The boy is sitting on a bench"
predictor = ColaPredictor("./models/epoch=1-step=535.ckpt")
print(sentence, "\n\t", predictor.predict(sentence))
sentence = "The boy are sitting on a benches"
print(sentence, "\n\t", predictor.predict(sentence))
sentence = "just for test....."
print(sentence, "\n\t", predictor.predict(sentence))
sentence = "asdfasdfasdf"
print(sentence, "\n\t", predictor.predict(sentence))
$ python inference.py
And my environment is,
- CUDA Version: 11.0
- Python 3.6.12
from mlops-basics.
The model is training. As you can see the loss is decreasing. Since the goal is to explore MLOps, not model training, I have done only a basic one. For the model to perform better, either try with a different model (I have used the smallest one to run experiments faster) or tune the hyper-parameters.
from mlops-basics.
I thought maybe the inference was going wrong, with very different inputs giving almost the same scores.
These are the sentences using the training step; one is for acceptable, and the other is vice versa.
But, They got similar scores also. I guessed these samples would get distinct scores. So, I was confused.
The critics laughed the play off the stage.
[{'label': 'unacceptable', 'score': 0.31048455834388733}, {'label': 'acceptable', 'score': 0.6895154714584351}]
There were killed three men by the assassin.
[{'label': 'unacceptable', 'score': 0.3104795813560486}, {'label': 'acceptable', 'score': 0.6895204186439514}]
I'll tune the hyper-parameters and try again! Thanks!
from mlops-basics.
Related Issues (17)
- [Bug] Getting an error related to colorlog during the training HOT 2
- Is training happening? HOT 3
- Different module metrics for train/val HOT 2
- Advice how to deploy and run my docker image on my own local machine HOT 7
- Potential Error in Blog of Week 0 HOT 1
- Metric not matched between in `early_stopping_callbacks` (Week 1) HOT 1
- How to push a container to specific repository in GitHub Actions? HOT 2
- What is Postman? How to set it up? HOT 1
- Does it work on Windows? HOT 1
- AWS Lambda Function: Test error HOT 3
- Change Dimension of Softmax from 0 to 1 in modules from week 1 to 4
- Key error on Week1 HOT 2
- Cannot use `load_dataset('glue', 'cola')` in Week0 requirements.txt
- Error with numpy and transformers modules
- DVCFiles alternative not working
- Lambda Environent Support for SQLite3 Older Versions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlops-basics.