Open khintz opened 1 day ago
This is a great idea. Some thoughts that come to mind:
mdp
datastore returns a zarr, the npy
datastore returns a numpy-array, by default. The user can however always override this default and output to any given format.plot_example
but rather this could be replaced by your new functionality. (i.e. Output as tensor without any metadata for debugging.)on_test_...
logic. But actually pytorch would provide a on_predict_...
set of functions. This PR suggested changing this and also making sure that predict_step()
is properly used. https://github.com/mllam/neural-lam/pull/45/files Currently, neural-lam overwrites predict_step
and uses it during training.So to summarize, this is clearly required. I suggest to make the output format flexible with sensible defaults. Also to adhere to pytorch's predict_...
logic (maybe in a separate PR). And finally get rid of the two Draft PRs listed above.
When running evaluation mode figures are being created. Currently, there is no option to output the predictions. I would like to implement the option to output predictions as a Zarr dataset. (WIP: https://github.com/khintz/neural-lam/tree/feature/output).
This should be possible by converting the
predictions
tensor from the functiontest_step
to a Zarr dataset.This could be done by utilising the existing function
create_dataarray_from_tensor
https://github.com/mllam/neural-lam/blob/main/neural_lam/weather_dataset.py#L509 and then simply using xarray to output to zarr.