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

Importing the exported model with --delete-model set to True removes all history and the imported model is also not able serve without manually registering it again #14

Open
uvnikgupta opened this issue Aug 2, 2021 · 9 comments

Comments

@uvnikgupta
Copy link

uvnikgupta commented Aug 2, 2021

I imported the exported model using the command python -u -m mlflow_export_import.model.import_model --model regres --experiment-name regres_imported --input-dir out --delete-model True . It gets imported successfully but it has the following undesired side effects:

  1. Deletes all the previous history for this model
  2. Does not show the model type and the model name in the "Models" column in the MLFlow UI Experiments tab. Due to this, details of the model, like the model signature is not available in the "runs" details
  3. The imported model is not able to serve the requests. I have to manually register the model once again to get it working. By doing this I also get the model signature for the registered model in the "Models" tab but the model type and name are still missing in the Experiments tab and the model signature is not available in the "runs" details for this model

CSV downloaded from the UI is attached for reference.
runs.txt

@uvnikgupta uvnikgupta changed the title Importing the exported model with --delete-model set to True removes all history Importing the exported model with --delete-model set to True removes all history and the imported model is also not able serve Aug 2, 2021
@uvnikgupta uvnikgupta changed the title Importing the exported model with --delete-model set to True removes all history and the imported model is also not able serve Importing the exported model with --delete-model set to True removes all history and the imported model is also not able serve without manually registering it again Aug 2, 2021
@amesar
Copy link
Owner

amesar commented Aug 3, 2021

  1. Deletes all the previous history for this model

That is what it is supposed to do. Check the documentation with --help.

  1. Does not show the model type...

Cannot reproduce.

  1. The imported model is not able to serve the requests.

Cannot reproduce. Works fine for me.

@uvnikgupta
Copy link
Author

@amesar , have you tested this with pyfunc model?
Can you please tell what details should I provide to show this problem.

@amesar
Copy link
Owner

amesar commented Aug 5, 2021

Without the source code and reproducible steps, sort of hard to troubleshoot.

@uvnikgupta
Copy link
Author

uvnikgupta commented Aug 6, 2021

All my source code and the setup is available in my public github repo @ https://github.com/uvnikgupta/mlflow. Using this repo anyone can setup a E2E MLflow workflow with experiments, model registration and model serving in a local kubernetes environment quickly. Once this is setup, I use your module to export the "regres" model and then import it again. The export is successful but import has undesired side effects as mentioned in this issue log.

@amesar
Copy link
Owner

amesar commented Aug 8, 2021

I don't work on Windows. Since export is successful, send me a zip file of the exported model in order to debug.

@uvnikgupta
Copy link
Author

Issue-14.pptx
I have uploaded a PPT which contains the zip of the export folder and the screen shots of the issue. I hope this helps.

@amesar
Copy link
Owner

amesar commented Aug 9, 2021

Don't see a zip file.

@uvnikgupta
Copy link
Author

out.zip
attaching it here

@amesar
Copy link
Owner

amesar commented Nov 7, 2021

I have successfully imported the model. When I try to pyfunc.load_model I am getting a "valueError: unsupported pickle protocol: 5". I'd suggest you use flavor-specific logging such as sklearn.log_model instead of pyfunc.log_model. You will still be able to pyfunc.load_model the model.

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