Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Remove pprint_as_string from optimization #924

Merged
merged 6 commits into from
Jun 23, 2020

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Jun 18, 2020

Summary

The pprint_as_string method will be removed from the optimization module.

Details and comments

@molar-volume
Copy link

in this tutorial, we can also change all
print(mod.export_as_lp_string()) ---> print(mod)

can I do it?

@molar-volume
Copy link

molar-volume commented Jun 18, 2020

@Cryoris the method print_as_lp_string() does not work on docplex.mp.model or QuadraticProgram, although I did not remove it

I would skip the whole line
"You can display your optimization problem e.g. with the print_as_lp_string method."

@Cryoris
Copy link
Contributor Author

Cryoris commented Jun 19, 2020

@molar-volume nice to see you're motivated! But we cannot use print() yet because the tutorials should work with the latest official release (the current stable branch on GitHub) and the print() method was only added recently to master.

Good catch with the print_as_lp_string, I removed that line.

@Cryoris
Copy link
Contributor Author

Cryoris commented Jun 19, 2020

The build fails due to a cell timeout, but all cells run in a few seconds. @nonhermitian do you know what's going on here?

@nonhermitian
Copy link
Contributor

Yes: #925

@nonhermitian
Copy link
Contributor

nonhermitian commented Jun 19, 2020

The file was run using an odd kernel name (seen this before from the optimization notebooks):

No such kernel named python37564bitlatestvirtualenv76cfe9d7d3f749489cf2ff69593234af

The kernel name should be python3.

@Cryoris
Copy link
Contributor Author

Cryoris commented Jun 19, 2020

Got it, thanks!

@nonhermitian nonhermitian self-requested a review June 23, 2020 11:18
Copy link
Contributor

@nonhermitian nonhermitian left a comment

Choose a reason for hiding this comment

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

Thanks for this.

@nonhermitian nonhermitian merged commit 6419a62 into Qiskit:master Jun 23, 2020
@Cryoris Cryoris deleted the remove-pprint branch June 24, 2020 07:23
manoelmarques pushed a commit to manoelmarques/qiskit-optimization that referenced this pull request Mar 5, 2021
…rint

Remove pprint_as_string from optimization
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants