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

Option to omit printing Ipopt header information #112

Closed
juliohm opened this issue Apr 23, 2018 · 12 comments
Closed

Option to omit printing Ipopt header information #112

juliohm opened this issue Apr 23, 2018 · 12 comments

Comments

@juliohm
Copy link

juliohm commented Apr 23, 2018

Even though I've been using IpoptSolver(print_level=0), I still get this header printed on the first run:

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

Is there any way to omit this information?

@odow
Copy link
Member

odow commented Apr 23, 2018

Not to my knowledge. The list of options that can be passed to Ipopt is here.

You could use redirect_stdout as suggested here, but if you are distributing the code, I'm not sure of the licence implications.

@mlubin
Copy link
Member

mlubin commented Apr 23, 2018

@mlubin mlubin closed this as completed Apr 23, 2018
@juliohm
Copy link
Author

juliohm commented Apr 23, 2018

Wow, baked in the code, unbelievable. I would never do that to my users.

Thank you for pointing to the source code where this annoying message lies.

@mlubin
Copy link
Member

mlubin commented Apr 23, 2018

Actually, a bit more digging reveals there's an undocumented option to suppress this warning. IpoptSolver(sb="yes") does the trick for me. TIL.

@juliohm
Copy link
Author

juliohm commented Apr 23, 2018

Good catch! Works like a charm, maybe add to a FAQ? I am sure other people would feel happy about it.

@mlubin
Copy link
Member

mlubin commented Apr 24, 2018

Not sure about that. It could be perceived as disregarding the authors' intentions. I'd first want to see a discussion of this on the Ipopt mailing list.

@odow
Copy link
Member

odow commented Oct 17, 2018

Just to follow up: this came up in a discussion I had with Andreas. He intentionally made the option obscure and undocumented. We won't be adding this to the FAQ, or advertising it too widely.

@juliohm
Copy link
Author

juliohm commented Oct 17, 2018

This is not necessarily a smart move. You will just get more annoying issues asking for this feature.

@mlubin
Copy link
Member

mlubin commented Oct 17, 2018

@juliohm Could you clarify what you mean? Respecting the intentions of the author of Ipopt is not a smart move?

@juliohm
Copy link
Author

juliohm commented Oct 17, 2018

I mean that many people will open issues here in the future asking for such an option. And that it is more work on your side to repeat it over and over the same answer.

Alternatively, a better option in my view, is to be explicit about the author's license, given them credit in many places in the README, the docs, etc; contact the author of Ipopt, ask if he agrees that printing messages in the console can be annoying for users that do not need interactivity, but just run optimization in a batch.

@odow
Copy link
Member

odow commented Oct 17, 2018

contact the author of Ipopt

Andreas is the author of Ipopt.

@juliohm
Copy link
Author

juliohm commented Oct 17, 2018

And he prefers to enforce the message on users? Ok then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants