ondisk module

Full Documentation for hippynn.databases.ondisk module. Click here for a summary page.

Dataset stored as NPY files in directory or as NPZ dictionary.

class DirectoryDatabase(directory, name, inputs, targets, *args, quiet=False, allow_unfound=False, **kwargs)[source]

Bases: Database, Restartable

Database stored as NPY files in a directory.

Parameters:
  • directory – directory path where the files are stored

  • name – prefix for the arrays.

This function loads arrays of the format f”{name}{db_name}.npy” for each variable db_name in inputs and targets.

Other arguments: See Database.

Note

This database loader does not support the allow_unfound setting in the base Database. The variables to load must be set explicitly in the inputs and targets.

get_file_dict(directory, prefix)[source]
load_arrays(directory, name, inputs, targets, quiet=False, allow_unfound=False)[source]
class NPZDatabase(file, inputs, targets, *args, allow_unfound=False, quiet=False, **kwargs)[source]

Bases: Database, Restartable

load_arrays(file, inputs, targets, allow_unfound=False, quiet=False)[source]