-
Notifications
You must be signed in to change notification settings - Fork 33
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
Experimental new program interface #908
Conversation
"""[Experimental] Program decorator to turn function into remotely executable program. | ||
|
||
Example: | ||
>>> @program(provider=Provider(...), dependencies=[...]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@distributed_program?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, good question: is it @distributeD_program
or @distribute_program
here? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have distribute_task
, therefore I'm using distribute_program
to be consistent :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, that closes the question quite easily 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, the Example
must be match to the name :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is true! fixed in 112cac7
def distribute_program( | ||
provider: Optional[Any] = None, | ||
dependencies: Optional[List[str]] = None, | ||
working_dir: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple distributed programs that are executed at the same time with the same working directory may override the entry point file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point!
Should we add some random id to autogenerated entrypoints and working directories names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding random id to the entrypoint may be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in c27d98f
docs/running/notebooks/06_running_programs_using_decorators.ipynb
Outdated
Show resolved
Hide resolved
docs/running/notebooks/06_running_programs_using_decorators.ipynb
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
Summary
POC of new interface for program. It adds ability to define and run program inside one file, which is useful for notebook execution.
Details and comments
Notebook -> https://github.com/Qiskit-Extensions/quantum-serverless/blob/feature/program-decorator/docs/running/notebooks/06_running_programs_using_decorators.ipynb