EOFError trying to assign a model using a custom module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 09:28 AM
I'm in a Data Science Bootcamp, and the final case study includes data preprocessing (done), using a linear regression model on the data, then porting to SQL for visualization. The model build uses custom python code provided as part of the exercise. I've attached that code, and the two files that the code pickles.
Python command used:
model = absenteeism_model('/dbfs/FileStore/shared_uploads/1009276498.DIGIOVANN/model', '/dbfs/FileStore/shared_uploads/1009276498.DIGIOVANN/scaler')
Even with the explicit path provided to these files, I get the error below.
EOFError Traceback (most recent call last)
<command-725274> in <module>
----> 1 model = absenteeism_model('/dbfs/FileStore/shared_uploads/1009276498.DIGIOVANN/model', '/dbfs/FileStore/shared_uploads/1009276498.DIGIOVANN/scaler')
/dbfs/FileStore/shared_uploads/1009276498.DIGIOVANN/absenteeism_module.py in __init__(self, model_file, scaler_file)
41 with open('model','rb') as model_file, open('scaler', 'rb') as scaler_file:
42 self.reg = pickle.load(model_file)
---> 43 self.scaler = pickle.load(scaler_file)
44 self.data = None
45
EOFError: Ran out of input
- Labels:
-
Data Science
-
Model
-
Module
-
SQL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2022 01:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 01:36 PM
It would be great if you could share the full stack trace to check what happened.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2022 05:54 AM
Hi @Joe DiGiovanni
Just wanted to check in if you were able to resolve your issue or do you need more help? We'd love to hear from you.
Thanks!