AutoModel
Builds config and models automatically.
- class multivae.models.AutoConfig[source]
Class to reload any multivae.models configuration.
- classmethod from_json_file(json_path)[source]
Creates a
BaseMultiVAEConfiginstance from a JSON config file. It builds automatically the correct config for any multivae.models.- Parameters:
json_path (str) – The path to the json file containing all the parameters
- Returns:
The created instance
- Return type:
- class multivae.models.AutoModel[source]
Utils class allowing to reload any
multivae.modelsautomatically.- classmethod load_from_folder(dir_path)[source]
Class method to be used to load the model from a specific folder.
- Parameters:
dir_path (str) – The path where the model should have been be saved.
Note
This function requires the folder to contain:
- a
model_config.jsonand amodel.ptif no custom architectures were provided
or
- a
model_config.json, amodel.ptand aencoders.pkl(resp.decoders.pkl) if a custom encoders (resp. decoders) were provided
- classmethod load_from_hf_hub(hf_hub_path, allow_pickle=False)[source]
Class method to be used to load a automaticaly a pretrained model from the Hugging Face hub.
- Parameters:
hf_hub_path (str) – The path where the model should have been be saved on the hugginface hub.
Note
This function requires the folder to contain:
- a
model_config.jsonand amodel.ptif no custom architectures were provided
or
- a
model_config.json, amodel.ptand aencoder.pkl(resp.decoder.pkl) if a custom encoder (resp. decoder) was provided