{"id":18990915,"url":"https://github.com/datadrivers/mlflow_getting_started","last_synced_at":"2025-10-25T11:35:47.600Z","repository":{"id":43454793,"uuid":"378955271","full_name":"datadrivers/mlflow_getting_started","owner":"datadrivers","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-10T15:10:37.000Z","size":721,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-01T14:44:06.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadrivers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-21T14:17:11.000Z","updated_at":"2022-03-01T20:08:23.000Z","dependencies_parsed_at":"2023-01-19T19:45:20.045Z","dependency_job_id":null,"html_url":"https://github.com/datadrivers/mlflow_getting_started","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fmlflow_getting_started","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fmlflow_getting_started/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fmlflow_getting_started/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadrivers%2Fmlflow_getting_started/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadrivers","download_url":"https://codeload.github.com/datadrivers/mlflow_getting_started/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002229,"owners_count":19732165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T17:12:07.218Z","updated_at":"2025-10-25T11:35:42.534Z","avatar_url":"https://github.com/datadrivers.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"![mlflow](https://s20.directupload.net/images/220301/qlrp88lw.png)\n\n# Getting started with mlflow\n\nThis repo aims to show some first steps with mlflow.\n* Tracking\n* Models\n* Model Registry\n\n## Contents\n\n- [Getting started with mlflow](#getting-started-with-mlflow)\n  * [General](#general)\n  * [Simulation on localhost](#simulation-on-localhost)\n  * [Further reading](#further-reading)\n    \n\n## General\n\nTo use mlflow one general needs:\n* a server on which mlflow runs (incl. the ui)\n* an artifact store\n* a database as well as a connector (e.g. sqlite)\n\nNote that a database is not mandatory for tracking. If not specified, mlflow will create a specific folder structure on the disk instead. \nHowever, using the Model Registry is not possible in that case.\n\n#### Pyspark Serving\n\nNote that the pyspark serving notebook is optional.  \nIf you want to use it, you need to install pyspark and pyarrow as defined in the requirements.  \nNote that a corresponding java version needs to be installed as well to run spark.  \n\n## Simulation on localhost\n\nHere, localhost simulates a cloud on which mlflow is running. A dedicated folder resp. database simulates the artifact store and remote database. \n\nFirst, set up a virtual environment given the requirements. \n\nThen, create an empty database, e.g. via sqlite which should be built in for macOs.  \n\n``` console\ncd cloud_mock\nsqlite 3\n```\n\n``` console\n.save mlflow.db\n.exit\n```\n\nThen start mlflow ui in your active virtual environment and start mlflow server while you're working directory is *cloud_mock*.\n\n```console\nmlflow server \\\n    --backend-store-uri sqlite:///mlflow.db \\\n    --default-artifact-root ./../cloud_mock/artifacts \\\n    --host 127.0.0.1\n```\n\nNote that one reaches the minimal setup via\n\n```console\nmlflow ui\n```\n\nbut this has some disadvantages as described above. \n\n### Create an endpoint\n\nOnce a model is registered, one can serve the model \n\n```console\nmlflow models serve -m \"models:/{model_name}/{model_version}\" -p yourport\n```\n\nMake sure to set the tracking uri in the corresponding terminal.\n\n```console\nexport MLFLOW_TRACKING_URI='http://localhost:5000'\n```\n\nNote that there are few other opportunities, e.g. building a docker-image or building specific images\nto deploy the model to different cloud platforms.\n\n## Further reading\n\n* [Official documentation](https://www.mlflow.org/docs/latest/index.html)\n* [Managed MLflow by databricks](https://databricks.com/de/product/managed-mlflow) \n* [Mlflow docker as a oneliner](https://github.com/Toumash/mlflow-docker)\n* [Databricks pricing](https://databricks.com/product/pricing)\n* [GCP Setup proposal](https://medium.com/@Sushil_Kumar/setting-up-mlflow-on-google-cloud-for-remote-tracking-of-machine-learning-experiments-b48e0122de04)\n* [AWS Setup proposal](https://aws.amazon.com/blogs/machine-learning/managing-your-machine-learning-lifecycle-with-mlflow-and-amazon-sagemaker/\n)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadrivers%2Fmlflow_getting_started","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadrivers%2Fmlflow_getting_started","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadrivers%2Fmlflow_getting_started/lists"}