ersilia.hub.fetch.register package¶
Submodules¶
ersilia.hub.fetch.register.register module¶
- class ersilia.hub.fetch.register.register.ModelRegisterer(model_id: str, config_json: dict)[source]¶
Bases:
ErsiliaBase
ModelRegisterer is responsible for registering models from various sources.
- Parameters:
model_id (str) – The ID of the model to be registered.
config_json (dict) – Configuration settings for the registerer.
Examples
registerer = ModelRegisterer( model_id="eosxxxx", config_json=config ) await registerer.register(is_from_dockerhub=True)
- async register(is_from_dockerhub: bool = False, is_from_hosted: bool = False, **kwargs)[source]¶
Register the model based on its source.
This method registers the model in the file system based on whether it was fetched from DockerHub or a hosted URL.
- Parameters:
is_from_dockerhub (bool, optional) – Indicates if the model is from DockerHub.
is_from_hosted (bool, optional) – Indicates if the model is from a hosted URL.
- Raises:
ValueError – If both is_from_dockerhub and is_from_hosted are True.
Examples
registerer = ModelRegisterer( model_id="eosxxxx", config_json=config ) await registerer.register(is_from_dockerhub=True)
- register_from_dockerhub(**kwargs)[source]¶
Register the model from DockerHub.
This method registers the model in the file system indicating it was fetched from DockerHub.
- register_from_hosted(**kwargs)¶
ersilia.hub.fetch.register.standard_example module¶
- class ersilia.hub.fetch.register.standard_example.ModelStandardExample(model_id: str, config_json: dict)[source]¶
Bases:
ErsiliaBase
ModelStandardExample is responsible for running standard CSV examples for models.
- Parameters:
model_id (str) – The ID of the model to run the example for.
config_json (dict) – Configuration settings for the example runner.
Examples
example_runner = ModelStandardExample( model_id="model123", config_json=config ) example_runner.run()