Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run sh run.sh without errors #3

Open
craine opened this issue Apr 16, 2020 · 1 comment
Open

Cannot run sh run.sh without errors #3

craine opened this issue Apr 16, 2020 · 1 comment

Comments

@craine
Copy link

craine commented Apr 16, 2020

Love the video tutorials but I'm constantly getting errors on the pkl files and cannot resolve. See below:

(base) charlies-mbp-2:ml-proj-template craine$ sh run.sh 0 Traceback (most recent call last): File "/Users/craine/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/craine/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/craine/Documents/workspace/ml-proj-template/src/predict.py", line 47, in <module> submission = predict() File "/Users/craine/Documents/workspace/ml-proj-template/src/predict.py", line 22, in predict encoders = joblib.load(os.path.join("models", f"{MODEL}_{FOLD}_label_encoder.pkl")) File "/Users/craine/opt/anaconda3/lib/python3.7/site-packages/joblib/numpy_pickle.py", line 597, in load with open(filename, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: 'models/_0_label_encoder.pkl'

@manikanthr5
Copy link

manikanthr5 commented May 26, 2020

Hi @craine. You are facing this issue becase:

  1. In the video tutorial, @abhishekkrthakur has initially trained the model. After that he commented out the required code for training model - Lines 6-10 in run.sh.
  2. It seems that you haven't trained the model look at line 51 in train.py.

To solve this problem, just uncomment the lines 6-10 in run.sh and it should work just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants