Skip to content

Commit

Permalink
fail on unmet requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jinensetpal committed Jul 24, 2024
1 parent 6c23576 commit 064094b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion label_studio_ml/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def _configure():
dagshub.init(*args['repo'].split('/')[::-1]) # user-level privileged auth token

req_path = mlflow.pyfunc.get_model_dependencies(f'models:/{args["model"]}/{args["version"]}')
shell(f'yes | uv pip install -r {req_path}')
try:
shell(f'yes | uv pip install -r {req_path}')
except:
raise ValueError("Failed to install requirements.txt.")

mlflow_model = mlflow.pyfunc.load_model(f'models:/{args["model"]}/{args["version"]}')

Expand Down

0 comments on commit 064094b

Please sign in to comment.