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

add snapshot_id to get_sampler interface on engine object #7005

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

senecameeks
Copy link
Collaborator

Fixes #7001

@senecameeks senecameeks requested review from wcourtney, vtomole, verult and a team as code owners January 30, 2025 02:05
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jan 30, 2025
Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.89%. Comparing base (0e5df4e) to head (d4b3c93).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7005      +/-   ##
==========================================
- Coverage   97.89%   97.89%   -0.01%     
==========================================
  Files        1085     1085              
  Lines       95098    95108      +10     
==========================================
+ Hits        93096    93104       +8     
- Misses       2002     2004       +2     

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

self,
processor_id: Union[str, List[str]],
run_name: str = "",
snapshot_id: str = "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

for backwards compatiblity, shouldn't snapshot_id be last since it's a new arg?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In #6739 , the reviewer suggestion was to put snapshot_id next to run_name since they are related. I'd like to keep the APIs consistent. I don't think our guarantees of backwards compatibility is stringent in cirq-google

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On second thought moving snapshot_id to the last arg is consistent with the get_sampler API on the EngineProcessor. Moving it

@senecameeks senecameeks enabled auto-merge January 30, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

snapshot_id option not working for engine.get_sampler()
4 participants