cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

EOFError trying to assign a model using a custom module

jdigiovanni
New Contributor

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

3 REPLIES 3

Prabakar
Esteemed Contributor III
Esteemed Contributor III

It would be great if you could share the full stack trace to check what happened.

Vidula
Honored Contributor

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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.