toqito icon indicating copy to clipboard operation
toqito copied to clipboard

Failure in non-local games tutorial

Open purva-thakre opened this issue 1 year ago • 3 comments

Vincent brought up this failure last week but we did not have a screenshot for it.

image

The difference between the expected and calculated values is large enough to think it is not due to the accuracy of the solvers.

Interestingly, this failure might happen only for Python 3.12.

purva-thakre avatar Jun 01 '24 15:06 purva-thakre

Nice catch. Yeah, don't quite know why this occurs in the docs only. I am able to run Python 3.12 on Mac with that snippet which yields (correctly) the 0.85 figure.

I wonder if it's somehow about how the docs are sequentially run and weather there might be something residual in the namespace that runs somewhat strangely in the docs for 3.12.

Good to have caught it, but definitely a bit perplexing!

vprusso avatar Jun 02 '24 03:06 vprusso

I am able to run Python 3.12 on Mac with that snippet which yields (correctly) the 0.85 figure.

I remember Nate saying something about a difference in a local macOS device vs. what's used by the workflows. I had unintentionally created a bug in mitiq by trying to please mypy. This led to a test passing locally on his device but the CI/CD would fail all the time.

If you see this code block passing locally on a macOS device, maybe it's a similar issue where the resources used in the runner differ from what's used on your local device. I know we don't use mypy yet but it could still be related to the accuracy of the solvers and available resources?

https://github.com/unitaryfund/mitiq/pull/2127

I did notice this failure twice yesterday. python3.11 would pass while python3.10 got canceled because python3.12 saw the failure in the screenshot.

purva-thakre avatar Jun 02 '24 16:06 purva-thakre

Ah, nice catch. And good point! It's probably something subtle like that. Which is good as it doesn't appear to be a breaking change, but definitely a bit frustrating as it's not clear where/how the state is being mangled here. Thanks for catching this!

vprusso avatar Jun 03 '24 22:06 vprusso

I think we can close this one out, but I'll wait for @purva-thakre to confirm whether I might be missing any reason to not do so.

vprusso avatar Jul 13 '24 16:07 vprusso

Did it resolve itself? I have not seen the failure after I created this issue.

purva-thakre avatar Jul 15 '24 00:07 purva-thakre

It has been a while since I've noticed the issue. If this one does rear its head again, we can go ahead and reopen the issue. For now, I'll tempt fate and close (which I'm sure will trigger the universe to throw the error again inadvertently).

vprusso avatar Jul 15 '24 11:07 vprusso

Opening back up: https://github.com/vprusso/toqito/actions/runs/9973551751/job/27559130957

vprusso avatar Jul 17 '24 11:07 vprusso

Okay, I'm going to close this yet again based on some recent work on the NLG module. Hoping that I won't need to open this back up :)

vprusso avatar Oct 04 '24 01:10 vprusso

reopening due to https://github.com/vprusso/toqito/pull/835#issuecomment-2406751685

purva-thakre avatar Oct 11 '24 12:10 purva-thakre

I want to work on this issue. Can you please assign this to me? Thank you

Shivansh20128 avatar Oct 11 '24 17:10 Shivansh20128

Absolutely! Assigned!

vprusso avatar Oct 11 '24 20:10 vprusso