gmlc-dispatches / dispatches

Primary repository for distributed dispatches software tools
https://dispatches.readthedocs.io/
Other
12 stars 34 forks source link

Jupyter Notebook Failures #200

Closed MarcusHolly closed 1 year ago

MarcusHolly commented 1 year ago

I ran into a few errors when running the Jupyter notebooks for some of the case studies before and after the latest MultiPeriodModel PR: https://github.com/IDAES/idaes-pse/pull/1180. Some of these might already be known (and acceptable), but there are also some that should probably be addressed. It's also possible that some of these failures are a result of my environment missing a few things, in which case the default configuration should probably be updated.

When Gurobipy is installed in my environment: image

lbianchi-lbl commented 1 year ago

@lbianchi-lbl and @radhakrishnatg discussed these 3 issues during the dev call. We'll add more information on how we think they could be addressed later.

radhakrishnatg commented 1 year ago

@MarcusHolly Could you please run the renewables_case/DoubleLoopOptimization.ipynb once again? I just ran the notebook on my laptop and I did not get that error message. @lbianchi-lbl Is this notebook tested in the CI?

MarcusHolly commented 1 year ago

@radhakrishnatg It seems I am unable to reproduce this error because I am now running into a GurobiError: Model too large for size-limited license; visit https://www.gurobi.com/free-trial for a full license in the 10th cell.

However, I will mention that the screenshot with the ValueError was ran a few weeks ago, and I haven't bothered to re-run it since due to the long runtime.

radhakrishnatg commented 1 year ago

Update on the remaining issues: (1) I opened PR #202 to fix the issue related to gurobi. I have added a check at the beginning of the notebook (similar to the one in the RE case study) that uses cbc as the linear solver if gurobi is not available. (2) The TEAL issue is related to two things: python version (currently it is compatible only with python 3.8), and RAVEN and TEAL are not installed by default. We need to run pip install -r requirements-raven.txt to install those packages.

radhakrishnatg commented 1 year ago

@MarcusHolly Did you run the renewable_case/DoubleLoopOptimization.ipynb notebook? Since you don't have Gurobi license, it will throw that error. Could you please uninstall gurobipy and then run it again? It should then use cbc as the linear solver.

MarcusHolly commented 1 year ago

@radhakrishnatg After uninstalling Gurobi, I'm still running into the same error for renewables_case/DoubleLoopOptimization.ipynb

After running pip install -r requirements-teal.txt, I'm no longer running into any issues for nuclear_case/multiperiod_design_pricetaker_wTEALandSynhist.ipynb

radhakrishnatg commented 1 year ago

Thank you @MarcusHolly I did not run the notebook properly before. I ran it again, and I did get the ValueError message. I guess this cell was skipped in the notebook tests. This needs to be fixed. @dguittet could you please take a look at the notebook and see what is causing this error message?

lbianchi-lbl commented 1 year ago

Thank you @MarcusHolly I did not run the notebook properly before. I ran it again, and I did get the ValueError message. I guess this cell was skipped in the notebook tests. This needs to be fixed. @dguittet could you please take a look at the notebook and see what is causing this error message?

@radhakrishnatg I believe the notebook itself is tested in CI, but it might be the case that this cell is skipped and/or depends on a previous cell that's being skipped (e.g. if the code in this cell is supposed to be executed post-solve).