-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fixes #5582 #5657
Fixes #5582 #5657
Conversation
Signed-off-by: Kyle Jarvis <kyle.jarvis1905@gmail.com>
@kyle-jarvis Thanks for the PR, left a few comments! |
Signed-off-by: Kyle Jarvis <kyle.jarvis1905@gmail.com>
@harupy Thanks for tidying that up, incorporated your suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This seems to be a minor breaking change for us. Is there a more elegant way to handle it? |
Hi, this is a breaking change for us as well. We sometimes use “multi-models”, which are basically models that encapsulates different weights for different use-cases but under single common interface. Imagine sentiment analysis model for different languages - all languages share the same code but use different weights. The weights used to be stored in separate subdirectories as follows:
This allowed us to simply download only the weights we need and run the model for english only. Or for english and czech at the same time. Or for all languages. All of this with just one model in registry and correctly downloaded weights. Now the subdirectories are prefixed with index:
so I have to agree with @vilmar-hillow that this change makes it unintuitive and more difficult to work with. I do not know internals of MLflow that well, but could we consider different way how the handle the original issue? Furthermore, I do not think that such changes should be under patch release. It is presented as a bug fix, but it only fixes behavior for one particular use-case and as you can see, it actually is a breaking change. |
PR mlflow#5657 was original made to fix mlflow#5582. However, based on the community feedback / discussion mlflow#5657 has caused more problems then it solved, so a different solution seems preferable. Signed-off-by: Kyle Jarvis <kyle.jarvis1905@gmail.com>
@vilmar-hillow @MajerMartin Sorry about that! Interesting to see how you folks are working with these kinds of things. I have raised #5891 to revert these changes and will look back at the original issue my use case was experiencing with the points you raised in mind. |
Hi @kyle-jarvis, thank you for your response and for taking an initiative to fix this. I really appreciate it and hope someone suggests another way to make your use-case work too. |
PR mlflow#5657 was original made to fix mlflow#5582. However, based on the community feedback / discussion mlflow#5657 has caused more problems then it solved, so a different solution seems preferable. Signed-off-by: Kyle Jarvis <kyle.jarvis1905@gmail.com> Signed-off-by: Michal Karzynski <michal.karzynski@intel.com>
Signed-off-by: Kyle Jarvis kyle.jarvis1905@gmail.com
What changes are proposed in this pull request?
The PR pertains to issue #5582 . It proposes to include a sub-directory to index artifacts as they are downloaded when saving an
mlflow.pyfunc.PythonModel
. This helps to avoid cases where artifacts may overwrite one-another due to common relative paths from distinct base uris, resulting in possibly unexpected behaviour.How is this patch tested?
A new test has been introduced to illustrate the problem that this patch addresses:
test_model_export_with_class_and_artifacts.py::test_multiple_artifacts_with_common_sub_paths_resolve_correctly_when_saving_model
Does this PR change the documentation?
ci/circleci: build_doc
check. If it's successful, proceed to thenext step, otherwise fix it.
Details
on the right to open the job page of CircleCI.Artifacts
tab.docs/build/html/index.html
.Release Notes
Is this a user-facing change?
(Details in 1-2 sentences. You can just refer to another PR with a description if this PR is part of a larger change.)
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/artifacts
: Artifact stores and artifact loggingarea/build
: Build and test infrastructure for MLflowarea/docs
: MLflow documentation pagesarea/examples
: Example codearea/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registryarea/models
: MLmodel format, model serialization/deserialization, flavorsarea/projects
: MLproject format, project running backendsarea/scoring
: MLflow Model server, model deployment tools, Spark UDFsarea/server-infra
: MLflow Tracking server backendarea/tracking
: Tracking Service, tracking client APIs, autologgingInterface
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Modelsarea/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registryarea/windows
: Windows supportLanguage
language/r
: R APIs and clientslanguage/java
: Java APIs and clientslanguage/new
: Proposals for new client languagesIntegrations
integrations/azure
: Azure and Azure ML integrationsintegrations/sagemaker
: SageMaker integrationsintegrations/databricks
: Databricks integrationsHow should the PR be classified in the release notes? Choose one:
rn/breaking-change
- The PR will be mentioned in the "Breaking Changes" sectionrn/none
- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/feature
- A new user-facing feature worth mentioning in the release notesrn/bug-fix
- A user-facing bug fix worth mentioning in the release notesrn/documentation
- A user-facing documentation change worth mentioning in the release notes