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

Display option name and option value of failed runs in the Sweeper class' run_sweep method #913

Conversation

jagandecapri
Copy link
Contributor

What are the issues this pull addresses (issue numbers / links)?

Fixes #907. There was a previous PR on this issue at PR 909 which was merged to main branch and reverted at PR 912 because the solution merged was not working. This PR fixes the issue in PR 909.

Did you add tests to cover your changes (yes/no)?

No. I'm not sure how to add test cases for this particular case.

Did you update the documentation accordingly (yes/no)?

No.

Did you read the CONTRIBUTING document (yes/no)?

Yes.

Summary

Currently, when a run fails during the execution of Sweeper class' run_sweep method, the warning message, does not tell which option name or option value that failed.

It will be useful to add which option name + option value (key) combination thatdidn't execute properly for reference in case the user wantst to run the sweeperagain for the failed option values

This commit adds the option name and option value that failed to the warning message.

Details and comments

…ass' `run_sweep` method

Fixes qiskit-community#907

Currently, when a run fails during the execution of Sweeper class' run_sweep method, the warning message, does not tell which option name or option value that failed.

It will be useful to add which option name + option value (key) combination thatdidn't execute properly for reference in case the user wantst to run the sweeperagain for the failed option values

This commit adds the option name and option value that failed to the warning message.
Previously, the code changed was too long. This commit breaks the line into multiple lines to keep with the convention of keeping the lines approximately 100 characters.
This reverts commit ac0a8ef.

The logging message does not work as expected when broken down into multiple lines. It throws an error when logging. Reverting this commit as it is not a workable solution.
Previously, the logging message was long. To keep with the convention of approximately 100 characters per line, the line is broken down into multiple lines. The previous commit fixing this issue mistakenly had a comma at the end of each f-string which caused error. There is no need for comma at the end of each f-string when broken down into multiple lines.
Copy link
Collaborator

@priti-ashvin-shah-ibm priti-ashvin-shah-ibm left a comment

Choose a reason for hiding this comment

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

LGTM, great job

@priti-ashvin-shah-ibm priti-ashvin-shah-ibm merged commit 948669b into qiskit-community:main Jan 27, 2023
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.

Display option name and option value of failed runs in the Sweeper class' run_sweep method
2 participants