Implement TaskLoader.save
when instantiated with xarray/pandas objects
#84
Labels
TaskLoader.save
when instantiated with xarray/pandas objects
#84
Summary
Currently, the
TaskLoader
can only be.save
d when it has been__init__
ed with filepaths in itscontext
andtarget
entries, not xarray/pandas data. However, this forces the user to have to save their normalised xarray/pandas data, when they might not actually care that much about where that data lives. For example:We could instead initialise the
TaskLoader
in the typical way with raw xarray/pandas objects (which is more intuitive than fpaths), and then when saving theTaskLoader
it will save those variables alongside the JSON config (with context/target file paths populated).This FR should only be implemented after #82 is closed. We don't want to save the same data multiple times just because it appears multiple times in the
context
and/ortarget entries. So we'll want to leverage whatever internal
TaskLoader` data structure is added to close #82.Basic Example
If this feature were implemented, we'd be able to do:
See comment above - we will not want to save two NetCDF files in this case, because they are the same objects.
Drawbacks
The user might not realise that
task_loader.save
will save data to disk, which is especially risky with very large NetCDF data and when disk space is limited. We'll need to be clear in the documentation that this is what is happening under the hood.Unresolved questions
No response
Implementation PR
No response
Reference Issues
No response
The text was updated successfully, but these errors were encountered: