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

Trying to get machine learning models... #83

Open
CholoTook opened this issue Oct 27, 2023 · 3 comments
Open

Trying to get machine learning models... #83

CholoTook opened this issue Oct 27, 2023 · 3 comments

Comments

@CholoTook
Copy link

Just following the readme...

$ python utils/download_files.py 
Downloading ml_models/bigwig_files/IC_matched_max.bw ...
Traceback (most recent call last):
  File "/home/dan/Build/genomic-data-service/utils/download_files.py", line 67, in <module>
    main()
  File "/home/dan/Build/genomic-data-service/utils/download_files.py", line 61, in main
    download_models(needs_downloading)
  File "/home/dan/Build/genomic-data-service/utils/download_files.py", line 50, in download_models
    s3.download_fileobj(BUCKET_NAME, PATH_TO_S3_KEY[file_], f)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/boto3/s3/inject.py", line 795, in download_fileobj
    return future.result()
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/s3transfer/futures.py", line 103, in result
    return self._coordinator.result()
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/s3transfer/futures.py", line 266, in result
    raise self._exception
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/s3transfer/tasks.py", line 269, in _main
    self._submit(transfer_future=transfer_future, **kwargs)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/s3transfer/download.py", line 354, in _submit
    response = client.head_object(
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/client.py", line 535, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/client.py", line 963, in _make_api_call
    http, parsed_response = self._make_request(
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/client.py", line 986, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/endpoint.py", line 119, in make_request
    return self._send_request(request_dict, operation_model)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/endpoint.py", line 198, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/endpoint.py", line 134, in create_request
    self._event_emitter.emit(
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/hooks.py", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/hooks.py", line 256, in emit
    return self._emit(event_name, kwargs)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/hooks.py", line 239, in _emit
    response = handler(**kwargs)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/signers.py", line 105, in handler
    return self.sign(operation_name, request)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/signers.py", line 189, in sign
    auth.add_auth(request)
  File "/home/dan/Build/genomic-data-service/.venv/lib/python3.10/site-packages/botocore/auth.py", line 418, in add_auth
    raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials

Sorry if I'm being stuipd!

@mingjiecn
Copy link
Collaborator

Hi Dan,

The machine learning models are in public S3 bucket. But you need your own AWS credentials for boto3 to connect to AWS. After you set up your own AWS credentials, you should have no problem to download the models.

@CholoTook
Copy link
Author

CholoTook commented Oct 27, 2023 via email

@mingjiecn
Copy link
Collaborator

If you have not created credentials, you can generate them using the AWS Management Console, which is available at https://console.aws.amazon.com/iam/. Store your credentials in a credential file locally. The credentials file is by default stored at ~/.aws/credentials. This post may help you: https://rollbar.com/blog/python-boto3-nocredentialserror/.

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