yocto-gl icon indicating copy to clipboard operation
yocto-gl copied to clipboard

Integrate mlflow-config into cli and enable custom stage name

Open krlng opened this issue 2 years ago • 7 comments

What changes are proposed in this pull request?

This pull-request will enable users to define custom names for model deployment stages as well as allow them to remove existing, add new and change their order using a config file. It is thereby implementing this Feature-Request

  • Add an --mlflow-config flag to server and ui cli command
  • Read Stage name, color and order from this config file if provided
  • Add /model-stages/list endpoint to pass information about stages to the frontend
  • Read stage information using the redux store
  • Adapt frontend to handle custom stage configuration in the relevant components

How is this patch tested?

Create a config.json, i.e.:

{
	"model_stages": [
      {
        "name":  "Dev",
        "color": "coral"
      },
      {
        "name":  "Staging",
        "color": "lemon"
      },
      {
        "name":  "Pre-Prod",
        "color": "coral"
      },
      {
        "name":  "Ultra Production Ready",
        "color": "lime"
      }
    ]
}

and start an mlflow instance with a model registry using the new cli flag --mlflow-config ./config.json, so for example:

# Start a database
docker run --name pg_modelregistry -e POSTGRES_USER=mlflow  -e POSTGRES_USER=mlflow -e POSTGRES_DB=mlflow -e POSTGRES_PASSWORD=mlflow -p 5432:5432 -d postgres

# Start mlflow
 mlflow server  --backend-store-uri postgresql://mlflow:mlflow@localhost:5432/mlflow --default-artifact-root file:./mlruns --mlflow-config ./config.json

After this, you will be able to see the configured stages everywhere, where stages are displayed.

For testing purposes we built a custom image internally and used it for some time already.

Does this PR change the documentation?

  • [ ] Yes. Make sure the changed pages / sections render correctly by following the steps below.
  1. Check the status of the ci/circleci: build_doc check. If it's successful, proceed to the next step, otherwise fix it.
  2. Click Details on the right to open the job page of CircleCI.
  3. Click the Artifacts tab.
  4. Click docs/build/html/index.html.
  5. Find the changed pages / sections and make sure they render correctly.

Release Notes

Is this a user-facing change?

  • [ ] Yes. Give a description of this change to be included in the release notes for MLflow users.:

Enable removal, addition, renaming and ordering model stages as well as the possibility to customize the color of their badges.

What component(s), interfaces, languages, and integrations does this PR affect?

Components

  • [ ] area/artifacts: Artifact stores and artifact logging
  • [ ] area/build: Build and test infrastructure for MLflow
  • [x] area/docs: MLflow documentation pages
  • [ ] area/examples: Example code
  • [x] area/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registry
  • [ ] area/models: MLmodel format, model serialization/deserialization, flavors
  • [ ] area/projects: MLproject format, project running backends
  • [ ] area/scoring: MLflow Model server, model deployment tools, Spark UDFs
  • [ ] area/server-infra: MLflow Tracking server backend
  • [ ] area/tracking: Tracking Service, tracking client APIs, autologging

Interface

  • [x] area/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev server
  • [ ] area/docker: Docker use across MLflow's components, such as MLflow Projects and MLflow Models
  • [ ] area/sqlalchemy: Use of SQLAlchemy in the Tracking Service or Model Registry
  • [ ] area/windows: Windows support

Language

  • [ ] language/r: R APIs and clients
  • [ ] language/java: Java APIs and clients
  • [ ] language/new: Proposals for new client languages

Integrations

  • [ ] integrations/azure: Azure and Azure ML integrations
  • [ ] integrations/sagemaker: SageMaker integrations
  • [ ] integrations/databricks: Databricks integrations

How should the PR be classified in the release notes? Choose one:

  • [ ] rn/breaking-change - The PR will be mentioned in the "Breaking Changes" section
  • [ ] rn/none - No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" section
  • [x] rn/feature - A new user-facing feature worth mentioning in the release notes
  • [ ] rn/bug-fix - A user-facing bug fix worth mentioning in the release notes
  • [ ] rn/documentation - A user-facing documentation change worth mentioning in the release notes

krlng avatar May 20 '22 10:05 krlng

@krlng Thanks for the contribution! The DCO check failed. Please sign off your commits by following the instructions here: https://github.com/mlflow/mlflow/runs/6523483229. See https://github.com/mlflow/mlflow/blob/master/CONTRIBUTING.rst#sign-your-work for more details.

github-actions[bot] avatar May 20 '22 10:05 github-actions[bot]

I am aware, that this is a pretty big change and not easy to review. How ever I think it would be a big benefit to enable custom stages and as the PR changes quite a lot of files, it would be great if it does not get stale, as this raises the danger of merge-conflicts.

Also I am happy to enhance the code and am eager for suggestions, as I don't know to much about reactjs .

krlng avatar May 25 '22 10:05 krlng

@yunpark93 thoughts on this?

BenWilson2 avatar May 25 '22 19:05 BenWilson2

I updated my fork once more and resolved all merge conflicts. I am willing to adapt it further and help to integrate it into the master for the next two weeks. After this, I probably won't have much capacity to do much additional work.

If there is no interest in this change, please let me know as well, so I can close the request.

krlng avatar Jul 18 '22 07:07 krlng

@yunpark93 any update on this ticket? This would be very valuable for a lot of people.

@BenWilson2 what is missing for the merge request to get approved.

Kay

kfleischmann avatar Jul 22 '22 09:07 kfleischmann

looks like a cool feature any update on this?

raghulkrishna avatar Aug 04 '22 06:08 raghulkrishna

I hope they review this soon.

efagerberg avatar Aug 26 '22 14:08 efagerberg

bump

chjort avatar Sep 29 '22 15:09 chjort

As I see no more movement in this and I am also not willing to maintain the PR, I'm going to close it. Sad that this work has been needless.

krlng avatar Oct 05 '22 06:10 krlng

Great feature.

skshahidur avatar Nov 11 '22 15:11 skshahidur

@krlng Did you get any further responses? Is there any further interest to allow custom stages? Please feel free to ping me and have a chat!

ddl-avanitanna avatar Jun 30 '23 00:06 ddl-avanitanna