Map Candidate package to ml_model endpoints
For now, Candidate within model experiments rely on the Generic package registry API. However, ModelVersion uses already the MlModel api. Once a package is created, it is difficult to change it's name/version, so the candidates that belong to a model version should already use the new ml_model apis
All candidates created within model registry usage should use the ml_model package type and API.
-
ml_model_packages.rb
upload should NOT create a model version, only create the package. The model, model version or candidate should already exist. (Improves ml_model package endpoints (!138787 - merged)) -
When creating a model, it will not use an existing experiment as its default experiment. If an experiment with that name already exists, the creation of the model should break. -
Candidates that belong to a model_version (candidate.model_version is not null), Ml::Candidate.artifact_root should be /projects/{packages}/packages/ml_model/{candidate.model_version.name}/{candidate.model_version.version}
. In this case, a candidate will not have a package, since it will be uploaded to the model version package. (Updated logic for MLflow Run artifact_url (!138715 - merged)) -
Behaviour for candidates where candidate.experiment.model
andcandidate.model_version
are nil will remain the same
Edited by Eduardo Bonet