You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorting indices is probably not the biggest performance issue when writing problem files, but it's an obvious one. With PyPy and CPython 3.6 and later, we can assume that dictionary keys are ordered. Hence, we can create deterministic problem files without sorting.
I suggest that we use sorted representations for 3.5 and earlier, and unsorted for 3.6 and later. The only real challenge with this involves testing, and it will likely require two sets of baselines.
The text was updated successfully, but these errors were encountered:
I strongly believe that Pyomo should produce deterministic output regardless of which (supported) version of Python the user happens to be running in. The rationale is that solvers can produce different outputs when the rows / columns are purmuted, and I do not think that we want to put ourselves in the position of justifying why Pyomo gave a different answer when the Python version changed.
Given the evolution of Python, I believe that we should reconsider this proposal. I noted that support for 3.4 was deprecated. I think it would be reasonable to have separate writers for modern python versions that exploit the idea proposed here, leaving backward compatible versions for 2.7 and 3.5.
Sorting indices is probably not the biggest performance issue when writing problem files, but it's an obvious one. With PyPy and CPython 3.6 and later, we can assume that dictionary keys are ordered. Hence, we can create deterministic problem files without sorting.
I suggest that we use sorted representations for 3.5 and earlier, and unsorted for 3.6 and later. The only real challenge with this involves testing, and it will likely require two sets of baselines.
The text was updated successfully, but these errors were encountered: