ai2cm / fv3net

explore the FV3 data for parameterization
MIT License
16 stars 3 forks source link

Count reservoir synchronization by timestep instead of batch during training #2293

Closed AnnaKwa closed 1 year ago

AnnaKwa commented 1 year ago

This PR updates how the synchronization is tracked in training. Previously the amount of data at the start of the training set to use for synchronization was specified as a number of batches. This was inflexible since the synchronization had to be a multiple of the data batch size, and in some cases the entire training dataset is a single large batch. Now, the synchronization can be set as a number of time steps. To enable this, a SynchronziationTracker class is added which counts the number of times the reservoir has been incremented. If the number of increments is less than the synchronization length, the data is cut out of the training set.

Added public API: