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

feat: support dependency list for decorator hybrid jobs #764

Merged
merged 6 commits into from
Oct 27, 2023
Merged

Conversation

ajberdy
Copy link
Contributor

@ajberdy ajberdy commented Oct 26, 2023

Issue #, if available:

Description of changes:

support listing dependencies by name instead of in a requirements file for decorator jobs

Testing done:

unit and manual testing

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.

@ajberdy ajberdy requested a review from kshitijc October 26, 2023 20:52
@ajberdy ajberdy requested a review from a team as a code owner October 26, 2023 20:52
@ajberdy ajberdy changed the title feat: support dependency list for hybrid jobs feat: support dependency list for decorator hybrid jobs Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0e19e30) 100.00% compared to head (36f17a3) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #764   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          129       129           
  Lines         8355      8360    +5     
  Branches      1860      1862    +2     
=========================================
+ Hits          8355      8360    +5     
Files Coverage Δ
src/braket/jobs/hybrid_job.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ajberdy
Copy link
Contributor Author

ajberdy commented Oct 26, 2023

Getting formatting errors unrelated to changes made here. Will fix and see what's going on with the description workflow too

Comment on lines 88 to 89
dependencies (str | Path | list[str]): Path (absolute or relative) to a requirements.txt
file to be used for the hybrid job.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
dependencies (str | Path | list[str]): Path (absolute or relative) to a requirements.txt
file to be used for the hybrid job.
dependencies (str | Path | list[str]): Path (absolute or relative) to a requirements.txt
file, or alternatively a list of strings, with each string being a `requirement specifier <https://pip.pypa.io/en/stable/reference/requirement-specifiers/#requirement-specifiers>`, to be used for the hybrid job.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also add some detail on what happens if there is already a requirements.txt file that is being included through the include_modules parameter and you additionally specify dependencies as a list of strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

include_modules only allows python modules (my_python_package.sub_module etc) and does not directly access the file system, so there is no way for users to provide a requirements.txt through include modules. include_modules is a code-only construct

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, yes. I forgot about that. Happy to approve once the docstring is updated.

@ajberdy ajberdy requested a review from kshitijc October 27, 2023 00:17
kshitijc
kshitijc previously approved these changes Oct 27, 2023
@ajberdy ajberdy merged commit e5aca85 into main Oct 27, 2023
22 checks passed
@ajberdy ajberdy deleted the dependencies branch October 27, 2023 00:35
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