Metadata Class¶
-
class
modelindex.models.Metadata.Metadata(flops: Union[str, int] = None, parameters: Union[str, int] = None, epochs: Union[str, int] = None, batch_size: Union[str, int] = None, training_data: [<class 'str'>, typing.List] = None, training_techniques: [<class 'str'>, typing.List] = None, training_resources: str = None, architecture: [<class 'str'>, typing.List] = None, _filepath: str = None, **kwargs)[source]¶ Metadata for a model.
- Parameters
flops (str,int) – number of FLOPs
parameters (str,int) – total number of parameters for the model
epochs (str,int) – how many epochs the model was trained
batch_size (str,int) – batch size for the model
training_data (str,list) – one or a list of datasets used in training
training_techniques (str,list) – one or a list of training techniques
training_resources (str) – hardware used to train
architecture (str, List) – one or a list of architectures used in the model
_filepath (str) – path to the file where the data is coming from
**kwargs – any other custom metadata
-
__init__(flops: Union[str, int] = None, parameters: Union[str, int] = None, epochs: Union[str, int] = None, batch_size: Union[str, int] = None, training_data: [<class 'str'>, typing.List] = None, training_techniques: [<class 'str'>, typing.List] = None, training_resources: str = None, architecture: [<class 'str'>, typing.List] = None, _filepath: str = None, **kwargs)[source]¶ - Parameters
flops (str,int) – number of FLOPs
parameters (str,int) – total number of parameters for the model
epochs (str,int) – how many epochs the model was trained
batch_size (str,int) – batch size for the model
training_data (str,list) – one or a list of datasets used in training
training_techniques (str,list) – one or a list of training techniques
training_resources (str) – hardware used to train
architecture (str, List) – one or a list of architectures used in the model
_filepath (str) – path to the file where the data is coming from
**kwargs – any other custom metadata
-
static
from_dict(d: Dict, _filepath: Optional[str] = None)[source]¶ Construct Metadata from a dict.
- Parameters
d (dict) – A dictionary of values
_filepath (str) – path to the file where the data is coming from
-
static
from_file(filepath: Optional[str] = None, parent_filepath: Optional[str] = None)[source]¶ Load a Metadata from a file.
- Parameters
filepath (str) – File from which to load the metadata
parent_filepath (str) – Parent filename (if file is imported from another file)
-
property
flops¶ Get the FLOPs
-
property
parameters¶ Get number of parameters
-
property
epochs¶ Get epochs
-
property
batch_size¶ Get batch size
-
property
training_data¶ Get training data used
-
property
training_techniques¶ Get techniques used
-
property
training_resources¶ Get training resources used
-
property
architecture¶ Get the architecture(s) used.