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

ve_run on example does not output initial_state.nc #544

Closed
hrlai opened this issue Sep 4, 2024 · 6 comments · Fixed by #551
Closed

ve_run on example does not output initial_state.nc #544

hrlai opened this issue Sep 4, 2024 · 6 comments · Fixed by #551
Assignees
Labels
bug Something isn't working

Comments

@hrlai
Copy link
Collaborator

hrlai commented Sep 4, 2024

When I try to following the example tutorial, ve_run finishes:

Starting Virtual Ecosystem simulation.
* Logging to: ve_example\out\logfile.log
* Loading configuration
* Saved compiled configuration: ve_example\out\vr_full_model_configuration.toml
* Built core model components
* Initial data loaded
* Models initialised: animals, plants, litter, hydrology, abiotic_simple, soil
* Starting simulation
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 24/24 [00:04<00:00,  5.34it/s] 
* Simulation completed
* Merged time series data
* Saved final model state
Virtual Ecosystem run complete.

But it did not save the initial_state.nc file to the out directory. My out folder only contains:

out\.gitignore
out\all_continuous_data.nc
out\final_state.nc
out\logfile.log
out\vr_full_model_configuration.toml

and as a result I wasn't able to continue the tutorial from here onwards...

@hrlai hrlai added the bug Something isn't working label Sep 4, 2024
@jacobcook1995
Copy link
Collaborator

jacobcook1995 commented Sep 5, 2024

Whether or not the initial state of the model is saved is set by the config option core.data_output_options.save_initial_state. This option seems to default to False, which is probably sane in general so that people don't get spammed with files they don't want.

For the tutorial we need the initial file for the examples to actually work, so the config file for the example run needs to be changed so that this file actually gets outputted.

If you keep this issue open I'll make a pull request to fix this, (and the documentation problem you noticed in #543)

@jacobcook1995 jacobcook1995 self-assigned this Sep 5, 2024
@jacobcook1995
Copy link
Collaborator

jacobcook1995 commented Sep 5, 2024

This bug has actually been fixed in the most recent development code, but we had not got round to releasing it to users yet. I will make a new release, which should fix this problem!

@hrlai
Copy link
Collaborator Author

hrlai commented Sep 5, 2024

Cool thanks! I was too keen and installed this pull request with pip install git+https://github.com/ImperialCollegeLondon/virtual_ecosystem.git@release/0.1.1a5 then needed to install tabulate too. But still ended up with

ModuleNotFoundError: No module named 'virtual_ecosystem.models.animals'

and I wasn't sure how to get this installed.

@hrlai hrlai closed this as completed Sep 5, 2024
@hrlai hrlai reopened this Sep 5, 2024
@jacobcook1995 jacobcook1995 linked a pull request Sep 6, 2024 that will close this issue
9 tasks
@jacobcook1995
Copy link
Collaborator

Yeah for the developer code we don't use pip for installation we use poetry, which is described here. The virtual rainforest documentation gives some explanation of how we use poetry here.

If you want to use poetry you really should be using pyenv, this might be useful to you in general actually as it helps a lot with managing python versions. A guide to installing and using pyenv can be found here.

Anyway hopefully we will get the new release out soon, and then you will just be able to simply install it using pip. I've added release schedules to the discussion agenda for the next team meeting, as it is important that we make sure that the data team has access to recent enough code.

@jacobcook1995
Copy link
Collaborator

The new version is now available through PyPI, so you should be able to install/upgrade it through pip. The new version is 0.1.1a5

@hrlai
Copy link
Collaborator Author

hrlai commented Sep 9, 2024

Thanks! I can confirm that this is solved with the new release.

@hrlai hrlai closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants