Skip to content
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

直接用demo好像无法成功运行,猜测是权限问题 #58

Closed
May-Yaha opened this issue Jun 9, 2023 · 3 comments
Closed

直接用demo好像无法成功运行,猜测是权限问题 #58

May-Yaha opened this issue Jun 9, 2023 · 3 comments

Comments

@May-Yaha
Copy link

May-Yaha commented Jun 9, 2023

Traceback (most recent call last):
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/boto3/s3/transfer.py", line 292, in upload_file
future.result()
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/s3transfer/futures.py", line 103, in result
return self._coordinator.result()
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/s3transfer/futures.py", line 266, in result
raise self._exception
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/s3transfer/tasks.py", line 139, in call
return self._execute_main(kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/s3transfer/tasks.py", line 162, in _execute_main
return_value = self._main(**kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/s3transfer/upload.py", line 758, in _main
client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/botocore/client.py", line 530, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/botocore/client.py", line 964, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The Access Key Id you provided does not exist in our records.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 70, in
mlflow.sklearn.log_model(lr, "model")
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/sklearn/init.py", line 436, in log_model
return Model.log(
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/models/model.py", line 563, in log
mlflow.tracking.fluent.log_artifacts(local_path, mlflow_model.artifact_path)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/tracking/fluent.py", line 903, in log_artifacts
MlflowClient().log_artifacts(run_id, local_dir, artifact_path)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/tracking/client.py", line 1137, in log_artifacts
self._tracking_client.log_artifacts(run_id, local_dir, artifact_path)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/tracking/_tracking_service/client.py", line 465, in log_artifacts
self._get_artifact_repo(run_id).log_artifacts(local_dir, artifact_path)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/store/artifact/s3_artifact_repo.py", line 170, in log_artifacts
self._upload_file(
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/mlflow/store/artifact/s3_artifact_repo.py", line 146, in _upload_file
s3_client.upload_file(Filename=local_file, Bucket=bucket, Key=key, ExtraArgs=extra_args)
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/boto3/s3/inject.py", line 143, in upload_file
return transfer.upload_file(
File "/opt/homebrew/Caskroom/miniforge/base/envs/mlflow/lib/python3.8/site-packages/boto3/s3/transfer.py", line 298, in upload_file
raise S3UploadFailedError(
boto3.exceptions.S3UploadFailedError: Failed to upload /var/folders/c0/z_mclgbd4xv322t8wdpyptz80000gp/T/tmpkg7o2um3/model/python_env.yaml to mlflow/1/6e54103d2d9849669c5eaa88033390ab/artifacts/model/python_env.yaml: An error occurred (InvalidAccessKeyId) when calling the PutObject operation: The Access Key Id you provided does not exist in our records.

@sachua
Copy link
Owner

sachua commented Jun 13, 2023

Did you set MinIO credentials? Make sure your aws_access_key_id and aws_secret_access_key is correct.

@May-Yaha
Copy link
Author

猜测是s3协议的问题,这个我已经设置了,但是mc config host list出来的是这个配置,在mlflow里链接的是s3://mlflow
mc | gcs
mc | URL : https://storage.googleapis.com
mc | AccessKey : YOUR-ACCESS-KEY-HERE
mc | SecretKey : YOUR-SECRET-KEY-HERE
mc | API : S3v2
mc | Path : dns
mc | local
mc | URL : http://localhost:9000
mc | AccessKey :
mc | SecretKey :
mc | API :
mc | Path : auto
mc | minio
mc | URL : http://minio:9000
mc | AccessKey : minio
mc | SecretKey : minio123
mc | API : s3v4
mc | Path : auto
mc | play
mc | URL : https://play.min.io
mc | AccessKey : Q3AM3UQ867SPQQA43P2F
mc | SecretKey : zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
mc | API : S3v4
mc | Path : auto
mc | s3
mc | URL : https://s3.amazonaws.com
mc | AccessKey : YOUR-ACCESS-KEY-HERE
mc | SecretKey : YOUR-SECRET-KEY-HERE
mc | API : S3v4
mc | Path : dns

@sachua
Copy link
Owner

sachua commented Jun 14, 2023

mc has its own config, you need to configure the AWS credentials file: https://github.com/sachua/mlflow-docker-compose/blob/8a46cefad2bf3ef785d317894db48b6968083838/README.md?plain=1#LL52C1-L58C8

@sachua sachua closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants