Skip to main content

bitfount_model

Contains the base classes for handling custom models.

Classes

BitfountModel

class BitfountModel(**kwargs: Any):

Base class for custom models which must implement DistributedModelProtocol.

A base tagging class to highlight custom models which are designed to be uploaded to Bitfount Hub.

Ancestors

  • bitfount.models.base_models._BaseModel
  • bitfount.models.base_models._BaseModelRegistryMixIn
  • bitfount.types._BaseSerializableObjectMixIn
  • abc.ABC
  • typing.Generic

Static methods


def serialize_model_source_code(    filename: Union[str, os.PathLike], extra_imports: Optional[List[str]] = None,)> None:

Serializes the source code of the model to file.

This is required so that the model source code can be uploaded to Bitfount Hub.

Arguments

  • filename: The filename to save the source code to.
  • extra_imports: A list of extra import statements to include in the source code.

Variables

  • static nested_fields : ClassVar[Dict[str, Mapping[str, Any]]]