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

Skip data preparation in model.setup if input data exist #85

Open
SarahAlidoost opened this issue Jun 19, 2023 · 2 comments
Open

Skip data preparation in model.setup if input data exist #85

SarahAlidoost opened this issue Jun 19, 2023 · 2 comments
Labels
nice to have Good/nice feature to have

Comments

@SarahAlidoost
Copy link
Member

Currently model.setup takes a config template file and prepares output that are needed for model.run i.e. these preprocessing:

        forcing_io.prepare_forcing(self._config)
        soil_io.prepare_soil_data(self._config)
        soil_io.prepare_soil_init(self._config)

It should be possible to skip data preparation in model.setup if input data exist.

@SarahAlidoost SarahAlidoost added the nice to have Good/nice feature to have label Jun 19, 2023
@Crystal-szj
Copy link

@SarahAlidoost Hi Sarah, it will help save storage space if we can skip data preparation when the input data is ready to be used. W can add an input parameter, prepare_data_option: Optional [bool] = True in model.setup, and add an if-else statement to decide whether to copy and prepare input data before running the model. Please let me know your opinion, and I'd like to pick up this issue.

@SarahAlidoost
Copy link
Member Author

@SarahAlidoost Hi Sarah, it will help save storage space if we can skip data preparation when the input data is ready to be used. W can add an input parameter, prepare_data_option: Optional [bool] = True in model.setup, and add an if-else statement to decide whether to copy and prepare input data before running the model. Please let me know your opinion, and I'd like to pick up this issue.

nice that you want to pick this up. Perhaps a better idea is that to be able to skip model.setup(), e.g. instead of

model = StemmusScope(config_file=path_to_config_file, model_src_path=path_to_exe_file)
model.setup()
model.run()

we can also do:

model = StemmusScope(config_file=path_to_config_file, model_src_path=path_to_exe_file)
model.run()

This will require to setself.cfg_file in init function and adding some validations for input and output directories e.g. they exist and are valid.

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

No branches or pull requests

2 participants