lox.save#

lox.save(data, path, mode='a', key=None)#

Save data to a specified path using a callback function. Each entry in the data dictionary is saved as a separate file with the key as the filename.

Parameters:
  • data (dict[str, Any]) – The data to be saved.

  • path (StringArray) – The path where the data will be saved.

  • mode (str) – The mode in which to open the file (β€˜a’ for append, β€˜w’ for write, β€˜x’ for exclusive creation).

  • key (jax.Array, optional) – An optional key to differentiate data when saving.