save

Contents

save#

seli.save(path: str | Path, obj: None | bool | int | float | str | type | Array | ShapeDtypeStruct | list | dict | Module | Any) None[source]#

Save a nested structure of modules and arrays and other containers to a file. All leaves of the nested structure must be serializable, i.e. standard json serializable objects, or part of the registry. All modules must be registered, i.e. their type is in the registry. Modules can be registered by specifying the name parameter when inheriting from Module.

Parameters:
  • path (str | Path) – The path to save the serialized object to.

  • obj (NodeType) – The nested structure to serialize.