lecture-python-advanced icon indicating copy to clipboard operation
lecture-python-advanced copied to clipboard

[chang_credible] ValueError: The algorithm terminated successfully

Open najuzilu opened this issue 4 years ago • 9 comments

Lecture chang_credible fails with the following error: Screen Shot 2020-06-01 at 2 33 44 PM

I suspect it could have something to do with the following warning: Screen Shot 2020-06-01 at 2 31 33 PM

The version of scipy and polytope packages are:

scipy                     1.4.1
polytope                  0.2.2 

najuzilu avatar Jun 01 '20 04:06 najuzilu

@najuzilu once you open these individual PRs for the specific lectures can you review and close #79 and #89 as duplicates

mmcky avatar Jun 01 '20 04:06 mmcky

@mmcky will do.

najuzilu avatar Jun 01 '20 04:06 najuzilu

Hi @thomassargent30 and @shizejin, you can find details regarding the chang_credible lecture above. I thought there was an issue with the missing polytope package but I have installed it and the issue persists (at a closer look, it makes sense that the issue is not related to the polytope package).

From my limited understanding, the error means that the problem cannot be solved within the given constraints.

najuzilu avatar Jun 02 '20 01:06 najuzilu

Thanks @najuzilu, it is true that polytope is redundant. There are duplicated imports in this lecture which we need to address after we solve the current "infeasibility" issue.

The current problem happens during the search for optimal consumption when the constraint on the real balance is not binding. May I ask @mmcky if the code was working before? It would be extremely helpful to know at which update was this error first raised. According to my investigation so far the construction of subgradients and hyperplane levels looks good to me and I may look into scipy.optimize.linprog.

shizejin avatar Jun 05 '20 13:06 shizejin

hi @shizejin - the code has worked before but it has been an issue for some time. We didnt' have CI setup at that stage so don't exactly know the software stack. It has had an issue since scipy=1.4.1 but not sure how much earlier than that.

mmcky avatar Jun 09 '20 00:06 mmcky

Thanks @mmcky, this is very helpful. I will investigate into scipy.optimize.linprog and see if anything has changed on that side.

shizejin avatar Jun 09 '20 11:06 shizejin

@shizejin do you have time to have another look into this issue? It would be great to get the advanced lectures back to 100% execution. I just don't have the skills needed to fix this one :-).

mmcky avatar Feb 14 '21 23:02 mmcky

@mmcky thank you so much for pinging me! I should definitely finish investigating this. I will work on it in the following days.

shizejin avatar Feb 15 '21 02:02 shizejin

thanks @shizejin let me know if I can help in any way. It would be awesome to get advanced back to 100% execution on the live site

mmcky avatar Feb 22 '21 00:02 mmcky