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

standardize taskgraph cache name and location for all models #1380

Merged
merged 7 commits into from
Aug 25, 2023

Conversation

emlys
Copy link
Member

@emlys emlys commented Aug 23, 2023

Description

Fixes #1230

I went with taskgraph_cache for the name of the directory. I put it at the top level in the workspace because not all models have an intermediate directory.

A few models used a cache directory that contained the taskgraph.db file as well as some other less-important intermediate outputs. I split these up so the taskgraph cache has its own directory and the intermediate outputs go in the intermediate directory.

Added output specs for SWY cache outputs that were missing them.

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@emlys emlys self-assigned this Aug 23, 2023
HISTORY.rst Outdated
all models. It is now called ``taskgraph_cache`` and located in the top
level of the workspace directory.
(`#1230 <https://github.com/natcap/invest/issues/1230>`_)
* Coastal Blue Carbon
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this is showing up in the diff - it was already in main.

@emlys emlys requested a review from dcdenu4 August 23, 2023 22:34
@emlys emlys marked this pull request as ready for review August 23, 2023 22:34
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @emlys , a nice quality of life improvement. Just a few quick questions.


suffix = utils.make_suffix_string(args, 'results_suffix')
intermediate_dir = os.path.join(
args['workspace_dir'], INTERMEDIATE_DIR_NAME)
output_dir = os.path.join(
args['workspace_dir'], OUTPUT_DIR_NAME)

utils.make_directories([output_dir, intermediate_dir, taskgraph_cache_dir])
utils.make_directories([output_dir, intermediate_dir])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TaskGraph creates the taskgraph cache dir if it doesn't exist already, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct!

Comment on lines -447 to -449
'outflow_direction_path': 'outflow_direction.tif',
'outflow_weights_path': 'outflow_weights.tif',
'kc_path': 'kc.tif',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were these deletions not being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they were unused

@emlys emlys requested a review from dcdenu4 August 25, 2023 15:57
Copy link
Member

@dcdenu4 dcdenu4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Emily!

@dcdenu4 dcdenu4 merged commit 285e184 into natcap:main Aug 25, 2023
20 checks passed
@emlys emlys deleted the task/1230 branch October 3, 2024 22:57
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

Successfully merging this pull request may close these issues.

Should we make our taskgraph cache directory structure and location consistent across models?
2 participants