-
Notifications
You must be signed in to change notification settings - Fork 19
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
RDDLSimServer data.json file truncated #254
Comments
Hmm so it's not us. We noticed this a while ago when running the code on a compute server, and thought it was something on the server's end. Now you've pointed out that it is basically the json package at fault. We'll roll out your solution soon. Alternatively if you wish to make a PR, you are welcome to do so. The extra analysis and debugging is also greatly appreciated, thanks! |
I have tested a little further and there are also a few cases with When I have some more time I will test further to verify the actual cause of the problem. Most likely I won't get a chance to do so in the next week. |
Might it have something to do with a limit on the server where the code is running? |
With large instances (many objects and states) and correspondingly large data.json files, it very often happens that the data.json files are cut off, i.e. a part is missing and is not formatted correctly.
I cannot exactly identify the cause of the problem, but it is not due to the implementation. I can rule out that it is due to a lack of disk space, and it shouldn't be due to memory either, as a Docker container has no resource constraints by default. No error is thrown if a file is saved incorrectly formatted/truncated and it is also not possible to say that a file is no longer written correctly above a certain size. Some files with 13MB were written correctly and some whose correct size is 8MB were only written up to 2.4MB.
However, switching from
json
toorjson
, a faster and more memory-efficient alternative, eliminates all problems.Fix
pyRDDLGym/pyRDDLGym/core/server.py
Line 154 in ad21a92
with
The text was updated successfully, but these errors were encountered: