Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Saved model with joblib NotFittedError unpredictably #118

Closed
JesperDramsch opened this issue Oct 13, 2020 · 2 comments
Closed

Saved model with joblib NotFittedError unpredictably #118

JesperDramsch opened this issue Oct 13, 2020 · 2 comments

Comments

@JesperDramsch
Copy link

Thanks for the library, been getting a lot of mileage out of this.

I'm fitting a TuneSearchCV instance

TuneSearchCV(
                model,
                config,
                n_trials=n_trials,
                cv=3,
                refit=True,
                search_optimization="hyperopt",
                loggers=["mlflow"],
                n_jobs=n_jobs,
                use_gpu=True
            )

and saving the instance with joblib dump, however, some of the saved models upon loading, return a NotFittedError after being loaded again:

sklearn.exceptions.NotFittedError: This TuneSearchCV instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator.

I tested the Estimators and they were fitted before saving. I'm kind of at the end of my debugging skills and wonder if this is a problem with tune-sklearn, possibly even related to #107?

@richardliaw
Copy link
Collaborator

Hmm that's super weird. Do you have a simple repro script that I can run?

@richardliaw
Copy link
Collaborator

Closing this now, not sure how to repro.

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

No branches or pull requests

2 participants