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

Temporary calibration DB #981

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Temporary calibration DB #981

merged 1 commit into from
Aug 14, 2024

Conversation

alecandido
Copy link
Member

I've been to actually run on qw11q, without exporting my own platforms (thus relying on those installed on the system).

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 47.82609% with 12 lines in your changes missing coverage. Please review.

Project coverage is 70.24%. Comparing base (0ca412b) to head (e5ce826).

Files Patch % Lines
src/qibolab/instruments/qm/controller.py 47.82% 12 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           default-threshold     #981      +/-   ##
=====================================================
- Coverage              70.30%   70.24%   -0.07%     
=====================================================
  Files                     64       64              
  Lines                   6679     6701      +22     
=====================================================
+ Hits                    4696     4707      +11     
- Misses                  1983     1994      +11     
Flag Coverage Δ
unittests 70.24% <47.82%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@alecandido
Copy link
Member Author

Of course, I have to write the tests, but I already requested the review such that you could also experiment by yourself.

It's an ugly fix, and maybe we should really report this as a bug to QM.

I checked for the repo for the qm-qua package, but apparently is not public (not linked on the PyPI page of the package, and I guess the organization would be https://github.com/qua-platform, where there isn't).

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

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

Thanks @alecandido. I reproduced the issue and confirmed this fixes it.

Comment on lines +135 to +136
write_calibration: bool = False
"""Require writing permissions on calibration DB."""
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need this? We could always just use the tempfile solution even when we have write access and it is not strictly required. I wouldn't expect a big overhead.

Copy link
Member Author

Choose a reason for hiding this comment

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

My only concern is that the temporary file will always be erased upon disconnection. So you will always lose that.

Copy link
Member

@stavros11 stavros11 Aug 16, 2024

Choose a reason for hiding this comment

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

Sorry, I could not write this earlier. I just wanted to note that this is probably not relevant if we are just executing, as this shouldn't change the content of the file, but could be relevant if we perform the mixer calibration. Currently the driver provides some functions to do that, but I think they are not that useful (I even erased from 0.2). Still, it may indeed be useful to keep this option in case we do that in the future. Another point is that mixer calibration cannot be done without write access, so it will not be possible with the global cluster installation.

Copy link
Member Author

@alecandido alecandido Aug 16, 2024

Choose a reason for hiding this comment

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

Thanks @stavros11 for the comment.

I agree this option might be useless, but it also has a default, so it's no harm. For the time being, merging it was the conservative approach, but we can revert it later on.

(removing the option would be a breaking change, but it's relevant only if the options will be truly used by someone...)

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

Thanks, also works for me.

@alecandido
Copy link
Member Author

I realized that the tests will be compromised in any case by 0.2, and they should run hardware. I'm merging this and #980 as hotfixes, refined support and tests will be rolled out in 0.2 (to avoid investing too much in something we'll change).

Base automatically changed from default-threshold to main August 14, 2024 15:13
@alecandido alecandido merged commit 0e5cc34 into main Aug 14, 2024
35 of 37 checks passed
@alecandido alecandido deleted the calibration-db-tempfile branch August 14, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants