credit.datasets.realtime_predict
================================

.. py:module:: credit.datasets.realtime_predict


Classes
-------

.. autoapisummary::

   credit.datasets.realtime_predict.RealtimePredictDataset


Module Contents
---------------

.. py:class:: RealtimePredictDataset(forecast_start_time, forecast_end_time, forecast_timestep, varname_upper_air, varname_surface, varname_dyn_forcing, varname_static, varname_diagnostic, filenames=None, filename_surface=None, filename_dyn_forcing=None, filename_forcing=None, filename_static=None, sst_forcing=None, history_len=1, transform=None, seed=42, rank=0, world_size=1)

   Bases: :py:obj:`torch.utils.data.Dataset`


   An abstract class representing a :class:`Dataset`.

   All datasets that represent a map from keys to data samples should subclass
   it. All subclasses should overwrite :meth:`__getitem__`, supporting fetching a
   data sample for a given key. Subclasses could also optionally overwrite
   :meth:`__len__`, which is expected to return the size of the dataset by many
   :class:`~torch.utils.data.Sampler` implementations and the default options
   of :class:`~torch.utils.data.DataLoader`. Subclasses could also
   optionally implement :meth:`__getitems__`, for speedup batched samples
   loading. This method accepts list of indices of samples of batch and returns
   list of samples.

   .. note::
     :class:`~torch.utils.data.DataLoader` by default constructs an index
     sampler that yields integral indices.  To make it work with a map-style
     dataset with non-integral indices/keys, a custom sampler must be provided.


   .. py:attribute:: varname_upper_air


   .. py:attribute:: varname_surface


   .. py:attribute:: varname_dyn_forcing


   .. py:attribute:: varname_static


   .. py:attribute:: varname_diagnostic


   .. py:attribute:: filenames


   .. py:attribute:: filename_surface
      :value: None



   .. py:attribute:: filename_dyn_forcing
      :value: None



   .. py:attribute:: filename_forcing
      :value: None



   .. py:attribute:: filename_static
      :value: None



   .. py:attribute:: forecast_start_time


   .. py:attribute:: forecast_end_time


   .. py:attribute:: forecast_timestep


   .. py:attribute:: forecast_times


   .. py:attribute:: forecast_len
      :value: 0



   .. py:attribute:: history_len
      :value: 1



   .. py:attribute:: transform
      :value: None



   .. py:attribute:: seed
      :value: 42



   .. py:attribute:: rank
      :value: 0



   .. py:attribute:: world_size
      :value: 1



   .. py:attribute:: rng


   .. py:attribute:: sst_forcing
      :value: None



   .. py:attribute:: surface_files
      :value: None



   .. py:attribute:: dyn_forcing_files
      :value: None



   .. py:attribute:: all_files


   .. py:method:: __len__()


   .. py:method:: __getitem__(idx)


