-
Notifications
You must be signed in to change notification settings - Fork 657
Revert resource tracking to once again print to stdout #7392
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
base: master
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
If we're running into issues with the file getting too much stuff in it, could we just log each run to a different file by allowing the file to be set on the device at initialization? I can't see how writing to stdout would keep things cleaner than a file. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7392 +/- ##
=======================================
Coverage 99.65% 99.65%
=======================================
Files 529 529
Lines 50610 50615 +5
=======================================
+ Hits 50434 50439 +5
Misses 176 176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
🙌
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.
Looks good, pending existing suggestions👍
I haven't been involved in the discussions here, so apologies if this was already discussed, but is there not a way here to support structured and/or configurable output from null.qubit? E.g., an option to |
I could do this but it would likely involve adding another parameter to the constructor. Alternatively I could replace |
@jzaia18 I'll leave this to others that are involved in this project, but I can imagine as a user common use cases will be wanting to perform computations/visualizations on the data, and it can be non-trivial to do this programmatically if the data is on stdout! As a python user I would instead want to work with structured data of some sort (dicts, np arrays, etc) |
I'm not concerned with what's end-user-facing here, but it's true that the flexibility could be helpful internally. |
I have a working prototype that takes the following approach. |
Context:
The new resource tracking feature introduced in #7226 logs resource tracking information to a json file. This can cause issues when the file gets clobbered after multiple runs.
Description of the Change:
This PR reverts the behavior of resource tracking to once again print resource information to stdout instead of writing to a json file. This behavior is consistent with Catalyst.
Benefits:
Avoids potential issues with file clobbering.
Possible Drawbacks:
Dirties stdout when resource tracking is enabled, makes parsing output slightly more involved.
Related GitHub Issues:
#7226
[sc-88213]