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

feature: Add support for jobs #287

Merged
merged 200 commits into from
Nov 29, 2021
Merged

feature: Add support for jobs #287

merged 200 commits into from
Nov 29, 2021

Conversation

kshitijc
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Add support for Amazon Braket Hybrid Jobs.
  • Add default S3 buckets for quantum tasks.

Testing done:

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

licedric and others added 20 commits November 10, 2021 13:43
Futureproof parameters for PL version 0.19/0.20, and add comments
* make copy_aws_session public

* Add docstring, make func non-static

* change function name
* infra: Pin docutils<0.18 in doc requirements (#283)

docutils 0.18 was released on October 26, 2021, and with it came some [breaking changes](readthedocs/readthedocs.org#8616) for sphinx, and in turn [readthedocs builds](https://readthedocs.org/projects/amazon-braket-sdk-python/builds/15168485/). To keep doc builds working, docutils will be constrained to versions below 0.18.

* prepare release v1.9.5.post0

* update development version to v1.9.6.dev0

Co-authored-by: Cody Wang <[email protected]>
Co-authored-by: ci <ci>
* Add implementation

* Modify logging, add tests

* Remove comments

* Fix some feedback

* Modify exception handling, tests

* Reformat

* Fix test issues

* Fix test issues

* Try again

* feature: validate job creation endpoints for correct region

* remove print statement

* remove redundant log statements

* remove default bucket aws session region constraint

* testing

* remove validation and simplify

* Remove not needed data from aws_session fixture

* Add logger

* reformat, add logger docstring

* remove commented code

* remove not needed fixtures

* remove fixtures itself

* remove s3_region and custom bucket mocks

* remove codelocation fixture

* remove caplogs, don't pass exception

* use aws_session fixture instead of creating new mocks

Co-authored-by: Viraj Chaudhari <[email protected]>
* Revert "fix: Change default execution role to Amazon Braket Service-linked role (#140)"

This reverts commit 67f0a37.

* fix: Use default roles created using the console
* docs: Add docs for job examples

* address comments
* update ecr repo names to be prefixed with amazon-braket

* expect amazon-braket- prefix for custom ecr images

* add managed custom test case and clean up branches
fix: better exception handling for aws device
@kshitijc kshitijc requested a review from a team as a code owner November 29, 2021 18:33
@codecov
Copy link

codecov bot commented Nov 29, 2021

Codecov Report

Merging #287 (a55c294) into main (35e3ead) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              main      #287     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           43        63     +20     
  Lines         3102      4204   +1102     
  Branches       424       578    +154     
===========================================
+ Hits          3102      4204   +1102     
Impacted Files Coverage Δ
src/braket/aws/__init__.py 100.00% <100.00%> (ø)
src/braket/aws/aws_device.py 100.00% <100.00%> (ø)
src/braket/aws/aws_quantum_job.py 100.00% <100.00%> (ø)
src/braket/aws/aws_quantum_task.py 100.00% <100.00%> (ø)
src/braket/aws/aws_session.py 100.00% <100.00%> (ø)
src/braket/jobs/__init__.py 100.00% <100.00%> (ø)
src/braket/jobs/config.py 100.00% <100.00%> (ø)
src/braket/jobs/data_persistence.py 100.00% <100.00%> (ø)
src/braket/jobs/image_uris.py 100.00% <100.00%> (ø)
src/braket/jobs/local/__init__.py 100.00% <100.00%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35e3ead...a55c294. Read the comment docs.

@kshitijc kshitijc merged commit 92b9001 into main Nov 29, 2021
@kshitijc kshitijc deleted the jobs_release branch November 29, 2021 18:42
speller26 pushed a commit that referenced this pull request Nov 29, 2021
Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>
AbeCoull pushed a commit that referenced this pull request Feb 27, 2022
* infra: Pin docutils<0.18 in doc requirements (#283)

docutils 0.18 was released on October 26, 2021, and with it came some [breaking changes](readthedocs/readthedocs.org#8616) for sphinx, and in turn [readthedocs builds](https://readthedocs.org/projects/amazon-braket-sdk-python/builds/15168485/). To keep doc builds working, docutils will be constrained to versions below 0.18.

* prepare release v1.9.5.post0

* update development version to v1.9.6.dev0

* feature: Add support for jobs (#287)

Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>

* fix: Skip jobs integration tests (#288)

* prepare release v1.10.0

* update development version to v1.10.1.dev0

* feature: Adding integration tests for DM1 (#286)

* feature: Adding integration tests for DM1

* Moved many_layers to test_quantum_task

* formatting changes only

Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.11.0

* update development version to v1.11.1.dev0

* fix: remove extraneous reference from local job container setup (#292)

* prepare release v1.11.1

* update development version to v1.11.2.dev0

* feature: optimize IAM role retrieval (#299)

* fix: Enable jobs integration tests (#289)

* feature: Added is_available property to AwsDevice (#290)

Added is_available property to AwsDevice that parses the availability window and current device status to return a boolean flag if the device is currently available.

* prepare release v1.12.0

* update development version to v1.12.1.dev0

* feature: added controlled-sqrt-not gate (#297)

* feature: added controlled-sqrt-not gate

This makes certain circuits, like CHSH, more straightforward. This commit works in line with the following branches (also committed, separately):
https://github.com/unprovable/amazon-braket-schemas-python.git@ctrl-v-gate
https://github.com/unprovable/amazon-braket-default-simulator-python.git@ctrl-v-gate

* fix: ran tox linters

* fix: reverted tox.ini

Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.13.0

* update development version to v1.13.1.dev0

* feature: adding TwoQubitPauliChannel (#300)

* prepare release v1.14.0

* update development version to v1.14.1.dev0

Co-authored-by: Cody Wang <[email protected]>
Co-authored-by: ci <ci>
Co-authored-by: Kshitij Chhabra <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>
Co-authored-by: Jacob Feldman <[email protected]>
Co-authored-by: Mark Sweat <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: mbeach-aws <[email protected]>
AbeCoull pushed a commit that referenced this pull request Feb 27, 2022
* infra: Pin docutils<0.18 in doc requirements (#283)

docutils 0.18 was released on October 26, 2021, and with it came some [breaking changes](readthedocs/readthedocs.org#8616) for sphinx, and in turn [readthedocs builds](https://readthedocs.org/projects/amazon-braket-sdk-python/builds/15168485/). To keep doc builds working, docutils will be constrained to versions below 0.18.

* prepare release v1.9.5.post0

* update development version to v1.9.6.dev0

* feature: Add support for jobs (#287)

Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>

* fix: Skip jobs integration tests (#288)

* prepare release v1.10.0

* update development version to v1.10.1.dev0

* feature: Adding integration tests for DM1 (#286)

* feature: Adding integration tests for DM1

* Moved many_layers to test_quantum_task

* formatting changes only

Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.11.0

* update development version to v1.11.1.dev0

* fix: remove extraneous reference from local job container setup (#292)

* prepare release v1.11.1

* update development version to v1.11.2.dev0

* feature: optimize IAM role retrieval (#299)

* fix: Enable jobs integration tests (#289)

* feature: Added is_available property to AwsDevice (#290)

Added is_available property to AwsDevice that parses the availability window and current device status to return a boolean flag if the device is currently available.

* prepare release v1.12.0

* update development version to v1.12.1.dev0

* feature: added controlled-sqrt-not gate (#297)

* feature: added controlled-sqrt-not gate

This makes certain circuits, like CHSH, more straightforward. This commit works in line with the following branches (also committed, separately):
https://github.com/unprovable/amazon-braket-schemas-python.git@ctrl-v-gate
https://github.com/unprovable/amazon-braket-default-simulator-python.git@ctrl-v-gate

* fix: ran tox linters

* fix: reverted tox.ini

Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.13.0

* update development version to v1.13.1.dev0

* feature: adding TwoQubitPauliChannel (#300)

* prepare release v1.14.0

* update development version to v1.14.1.dev0

* documentation: fix documentation on environment variable to match the code. (#302)

* prepare release v1.14.0.post0

* update development version to v1.14.1.dev0

* feat: Update region switching for regional device arns (#169) (#303)

* prepare release v1.15.0

* update development version to v1.15.1.dev0

Co-authored-by: Cody Wang <[email protected]>
Co-authored-by: ci <ci>
Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>
Co-authored-by: Jacob Feldman <[email protected]>
Co-authored-by: Mark Sweat <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: mbeach-aws <[email protected]>
Co-authored-by: Yiheng Duan <[email protected]>
AbeCoull pushed a commit that referenced this pull request Mar 7, 2022
* Added integration tests and LHR region to device configuration (#174)

* fix: Add LHR to the list of device regions

* test updates

* fix: Add integration tests

* formatting changes

* fix: Return DiGraph for device.topology_graph (#175)

* sync: Merge from public repository (#176)

* infra: Pin docutils<0.18 in doc requirements (#283)

docutils 0.18 was released on October 26, 2021, and with it came some [breaking changes](readthedocs/readthedocs.org#8616) for sphinx, and in turn [readthedocs builds](https://readthedocs.org/projects/amazon-braket-sdk-python/builds/15168485/). To keep doc builds working, docutils will be constrained to versions below 0.18.

* prepare release v1.9.5.post0

* update development version to v1.9.6.dev0

* feature: Add support for jobs (#287)

Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>

* fix: Skip jobs integration tests (#288)

* prepare release v1.10.0

* update development version to v1.10.1.dev0

* feature: Adding integration tests for DM1 (#286)

* feature: Adding integration tests for DM1

* Moved many_layers to test_quantum_task

* formatting changes only

Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.11.0

* update development version to v1.11.1.dev0

* fix: remove extraneous reference from local job container setup (#292)

* prepare release v1.11.1

* update development version to v1.11.2.dev0

* feature: optimize IAM role retrieval (#299)

* fix: Enable jobs integration tests (#289)

* feature: Added is_available property to AwsDevice (#290)

Added is_available property to AwsDevice that parses the availability window and current device status to return a boolean flag if the device is currently available.

* prepare release v1.12.0

* update development version to v1.12.1.dev0

* feature: added controlled-sqrt-not gate (#297)

* feature: added controlled-sqrt-not gate

This makes certain circuits, like CHSH, more straightforward. This commit works in line with the following branches (also committed, separately):
https://github.com/unprovable/amazon-braket-schemas-python.git@ctrl-v-gate
https://github.com/unprovable/amazon-braket-default-simulator-python.git@ctrl-v-gate

* fix: ran tox linters

* fix: reverted tox.ini

Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Cody Wang <[email protected]>

* prepare release v1.13.0

* update development version to v1.13.1.dev0

* feature: adding TwoQubitPauliChannel (#300)

* prepare release v1.14.0

* update development version to v1.14.1.dev0

* documentation: fix documentation on environment variable to match the code. (#302)

* prepare release v1.14.0.post0

* update development version to v1.14.1.dev0

* feat: Update region switching for regional device arns (#169) (#303)

* prepare release v1.15.0

* update development version to v1.15.1.dev0

Co-authored-by: Cody Wang <[email protected]>
Co-authored-by: ci <ci>
Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>
Co-authored-by: Jacob Feldman <[email protected]>
Co-authored-by: Mark Sweat <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: mbeach-aws <[email protected]>
Co-authored-by: Yiheng Duan <[email protected]>

Co-authored-by: Cody Wang <[email protected]>
Co-authored-by: Viraj Chaudhari <[email protected]>
Co-authored-by: Milan Krneta <[email protected]>
Co-authored-by: Aaron Berdy <[email protected]>
Co-authored-by: Lin <[email protected]>
Co-authored-by: Roald Bradley Severtson <[email protected]>
Co-authored-by: Christian Madsen <[email protected]>
Co-authored-by: Jacob Feldman <[email protected]>
Co-authored-by: Mark Sweat <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: Mark C <[email protected]>
Co-authored-by: mbeach-aws <[email protected]>
Co-authored-by: Yiheng Duan <[email protected]>
laurencap added a commit to laurencap/amazon-braket-sdk-python that referenced this pull request Jul 5, 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

Successfully merging this pull request may close these issues.

9 participants