xdssio
42709ccba9 7 months ago
24 commits
README.md
XetHub mlflow Integration: Streamlining Experiment Tracking and Deployment
MLflow has gained popularity in the machine learning community due to its comprehensive set of features and ease of use.
It provides a seamless solution for experiment tracking, allowing researchers and data scientists to efficiently keep track of their experiments, parameters, and results.
Here we will give a demo of how to use the the mlflow-xethub integration.
Setup
- Install the XetHub CLI
- go to the project page and Duplicate the repo with the purple Duplicate button on the top left.
- Clone the repo to your local machine:
git xet clone https://xethub.com/<username>/<repo>.git && cd <repo>
- Create a virtual environment and install the dependencies:
python3.10 -m venv .venv source .venv/bin/activate pip install -f requirements.txt
Run
# Run server
python main.py server xet://<username>/<repo>/<branch>
# Run training
python main.py run
Copy mlruns to another branch
xet cp -r mlruns xet://<username>/<repo>/<branch>
UI
# if not cloned
git xet clone https://xethub.com/<user>/mlflow-tutorial.git --lazy runs && cd runs
mlflow ui
Serve
xet mount xet://<user>/<project>/main models
mlflow models serve -m models/mlruns/0/<run-id>/artifacts/model --no-conda -p 5000
# query from another terminal
curl http://127.0.0.1:5000/invocations -H 'Content-Type: application/json' -d '{
"dataframe_records": [{"age": 0.038075906433423,
"sex": 0.0506801187398186,
"bmi": 0.0616962065186832,
"bp": 0.0218723855140367,
"s1": -0.0442234984244459,
"s2": -0.0348207628376989,
"s3": -0.0434008456520249,
"s4": -0.0025922619981832,
"s5": 0.0199074861704627,
"s6": -0.0176461251598037
}]
}'
File List | Total items: 7 | ||
---|---|---|---|
Name | Last Commit | Size | Last Modified |
data | |||
mlruns/0 | |||
.gitattributes | |||
.gitignore | |||
README.md | |||
main.py | |||
requirements.txt |