SLTS Demo Throws Error from Polars Code Writing Results
Opened this issue · 8 comments
@mbbruch I'm sure this is something simple, but the SLTS example throws an error when its checking if the results were written. This is with the SLTS demo almost unchanged. I added one line of code to save the simulation to json. I would expect this to have no bearing on this error. Hopefully this is something pretty easy to fix, but I am no polars expert yet.
I'm using altrios version 0.2.3. I set it up last week in a new conda environment running python 3.10. Polars version '0.20.25'. Do we need to update our requirements.txt? Polars is at version 1.10.0 now.
I'll look into this... it's probably time to update the requirements.txt, but I'll need to do a scan through the codebase and update some Polars usage. The Polars API is considered stable now that it's past v1.0, but there were some breaking changes from 0.20 to 1.0.
@SWRIganderson to confirm, this is on main?
This is main. I have played around with this a bit more this morning. I was able to create the dataframe if I manually executed the code under the if statement. ENABLE_REF_OVERIDE is false. ENABLE_ASSERTS is true. That is why the error is occuring. Not the polars versions.
@mbbruch I was in between meetings earlier and couldn't type much. The two variables that I mentioned in my previous comment. Do those get set on the altrios install? I really feel like that example should work without errors straight out of the box without having to set environment variables. Is this being caused by me installing it for the development path? This is not an urgent problem. I just wanted to make sure you were aware so that we can have a good set of clean examples.
@SWRIganderson can you post the head
of to_dataframe_expected
and train_sim.to_dataframe()[-1]
here?
@mbbruch and @SWRIganderson , we very intentionally do not have a requirements.txt because that's all handled in pyproject.toml. If you modified the demo file, that might well have altered train_sim.to_dataframe()[-1]
to be inconsistent. The environment variable ENABLE_ASSERTS
was set to true by default because I wanted to make sure the test_demos.py
script actually ran an assert in this.
@SWRIganderson, troubleshooting steps in no particular order:
- remove the assert if you're knowingly modifying the file in such a way as to influence the result
- check the 2 dataframes being compared to see what they are if you don't expect the result to have changed from what's saved