Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLTS Demo Throws Error from Polars Code Writing Results #96

Open
SWRIganderson opened this issue Oct 21, 2024 · 8 comments
Open

SLTS Demo Throws Error from Polars Code Writing Results #96

SWRIganderson opened this issue Oct 21, 2024 · 8 comments
Assignees

Comments

@SWRIganderson
Copy link
Collaborator

@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.

image

@SWRIganderson
Copy link
Collaborator Author

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.

@mbbruch
Copy link
Collaborator

mbbruch commented Oct 21, 2024

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.

@mbbruch
Copy link
Collaborator

mbbruch commented Oct 21, 2024

@SWRIganderson to confirm, this is on main?

@SWRIganderson
Copy link
Collaborator Author

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.

@SWRIganderson
Copy link
Collaborator Author

@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.

@calbaker
Copy link
Contributor

@SWRIganderson can you post the head of to_dataframe_expected and train_sim.to_dataframe()[-1] here?

@calbaker
Copy link
Contributor

@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.

@calbaker
Copy link
Contributor

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants