-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model export: {http_status_code": 401} Authentication issue #158
Comments
This applies for the scenario: MLFlow OS --> MLFlow OS |
I believe mlflow's basic auth use case is not considered when the headers are made in HttpClient class mlflow-export-import/mlflow_export_import/client/http_client.py Lines 174 to 178 in 5248d88
By changing the way the get request is sent from:
to rsp = requests.get(uri, auth=(os.environ["MLFLOW_TRACKING_USERNAME"], os.environ["MLFLOW_TRACKING_PASSWORD"]), params=params) the 401 error is no longer present. Of course this breaks the previously implemented auth methods.
I would be willing to contribute a fix for this bug if some guidance on how to best integrate it with the rest is provided. |
Same problem, I fixed it manually in source code
|
Same problem if the tracking server enables authentication. I solved it by using @lasados's answer. |
When trying to run export-model command to export a specified model, there is this error:
export-model --model <model_name> --output-dir /tmp/export --versions 1,2
mlflow_export_import.common.MlflowExportImportException: {"message": "{"http_status_code": 401, "uri": "<mlflow_tracking_uri>/api/2.0/mlflow/registered-models/get", "params": {"name": "model_name"}, "response": "You are not authenticated.
already exported the env vars:
export MLFLOW_TRACKING_URI
export MLFLOW_TRACKING_USERNAME
export MLFLOW_TRACKING_PASSWORD
Of course when you use curl and add --user params it's working correctly but not without it:
curl -X GET $MLFLOW_TRACKING_URI/api/2.0/mlflow/registered-models/get?name=$MODEL_NAME --user "$MLFLOW_TRACKING_USERNAME:$MLFLOW_TRACKING_PASSWORD"
The text was updated successfully, but these errors were encountered: