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

Adding new Example Sklearn Heart Attack Predictor

Open lakshikaparihar opened this issue 2 years ago • 10 comments

What changes are proposed in this pull request?

Adding Scikit-learn Example to get the better understanding of the following :

  • How to log a pre-trained model (all the existing examples have added the training code with it)
  • How to add signature in your model
  • How to register your model through code
  • How to shift your model into production through code

How is this patch tested?

This code is tested locally using mlflow CLI

Does this PR change the documentation?

  • [x] No. You can skip the rest of this section.
  • [ ] 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?

  • [x] No. You can skip the rest of this section.
  • [ ] Yes. Give a description of this change to be included in the release notes for MLflow users.

(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 logging
  • [ ] area/build: Build and test infrastructure for MLflow
  • [ ] area/docs: MLflow documentation pages
  • [x] area/examples: Example code
  • [ ] 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

  • [ ] 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
  • [x] 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
  • [ ] 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

lakshikaparihar avatar Dec 26 '21 13:12 lakshikaparihar

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

github-actions[bot] avatar Dec 26 '21 13:12 github-actions[bot]

@lakshikaparihar Although you are adding adding an interesting example, your train.py is missing is log_metric call. You may want to combine the train.py and log_model.py and add a separate file for model transition and inference or create one Notebook for all the steps.

Bidek56 avatar Dec 26 '21 14:12 Bidek56

@lakshikaparihar Although you are adding adding an interesting example, your train.py is missing is log_metric call. You may want to combine the train.py and log_model.py and add a separate file for model transition and inference or create one Notebook for all the steps.

Thanks for the suggestion. I will try to implement through notebook.

lakshikaparihar avatar Dec 27 '21 05:12 lakshikaparihar

@lakshikaparihar are you still gonna work in this PR? I can help/own it if needed

rafaelvp-db avatar Jun 14 '22 13:06 rafaelvp-db

@rafaelvp-db yeah, I will continue working on it as soon as possible.

lakshikaparihar avatar Jun 18 '22 16:06 lakshikaparihar

@Bidek56 can you review it once again

lakshikaparihar avatar Jun 22 '22 09:06 lakshikaparihar

@lakshikaparihar

  1. In the Readme, --no-conda option has been deprecated in favor of --env-manager=local
  2. In the Readme, curl example contain spaces in Json which makes the Json invalid and the examples do not work, please use jsonlint to correct the Json
  3. I would suggest adding requirements.txt file which should contain all the necessary packages Thanks

Bidek56 avatar Jun 22 '22 13:06 Bidek56

@Bidek56 As we already have the conda.yaml i didn't add the requirement.txt , let me know if its still required.

lakshikaparihar avatar Jul 10 '22 15:07 lakshikaparihar

@Bidek56 As we already have the conda.yaml i didn't add the requirement.txt , let me know if its still required.

conda.yaml is missing pandas

Bidek56 avatar Jul 11 '22 14:07 Bidek56

@Bidek56 Ohk , Thanks for mentioning I have added the requirement.txt as well

lakshikaparihar avatar Jul 13 '22 08:07 lakshikaparihar