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

Endpoints #8

Merged
merged 2 commits into from
Dec 13, 2019
Merged

Endpoints #8

merged 2 commits into from
Dec 13, 2019

Conversation

dbolt
Copy link
Contributor

@dbolt dbolt commented Dec 13, 2019

Description

Choose Braket endpoint based on selected QPU ARN

  • Added endpoints to AwsSession, throws error if boto_session is
    connected to a region in which Braket does not reside.
  • Updated AwsQpu to select the AWS region based on the supplied QPU ARN
    since the QPUs reside in select locations.
  • Added tests for QS1, QS2, and QS3
  • Updated device creation tests to use real QPU arns instead of the fake
    ones

Testing

Derek Bolt🐾 added 2 commits December 12, 2019 15:53
- Added endpoints to AwsSession, throws error if boto_session is
connected to a region in which Braket does not reside.
- Updated AwsQpu to select the AWS region based on the supplied QPU ARN
since the QPUs reside in select locations.
- Added tests for QS1, QS2, and QS3
- Updated device creation tests to use real QPU arns instead of the fake
ones
@dbolt dbolt requested a review from avawang1 December 13, 2019 00:02
aws_access_key_id=creds.access_key,
aws_secret_access_key=creds.secret_key,
aws_session_token=creds.token,
profile_name=aws_session.boto_session.profile_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this OK if profile_name wasn't specified by user?

Copy link
Contributor Author

@dbolt dbolt Dec 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's safe. if profile_name wasn't specified then it will be "default".

(braket-sdk-3.7.4) laptop:/Volumes/workspaces/braket/braket-sdk  endpoints → echo $AWS_PROFILE

(braket-sdk-3.7.4) laptop:/Volumes/workspaces/braket/braket-sdk  endpoints → python
Python 3.7.4 (default, Oct  4 2019, 13:24:31) 
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
>>> session = boto3.Session()
>>> session.profile_name
'default'
>>> 

@dbolt dbolt merged commit 5b2ae88 into master Dec 13, 2019
@dbolt dbolt deleted the endpoints branch December 13, 2019 01:52
shiyunon pushed a commit to shiyunon/amazon-braket-sdk-python that referenced this pull request Mar 9, 2021
* Change annealing quadratic keys to strings because JSON doesn't support tuple keys
* Add annealing example to README
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

Successfully merging this pull request may close these issues.

2 participants