Giter VIP home page Giter VIP logo

Comments (5)

chloamme avatar chloamme commented on July 26, 2024 1

I changed only the lr value (1e-7), and it works well!! Thank you very much! 😄

from mlops-basics.

ravirajag avatar ravirajag commented on July 26, 2024

Hi @chloamme can you paste the training script also.

from mlops-basics.

chloamme avatar chloamme commented on July 26, 2024

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

Tensorboard captures are
image

from mlops-basics.

ravirajag avatar ravirajag commented on July 26, 2024

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.

chloamme avatar chloamme commented on July 26, 2024

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.
image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.