Command Line Interface
Command Line Interface to interact with the Ersilia Model Hub
auth
This command uses GitHub as an identity provider to log a user into Ersilia. Currently, Ersilia does not have user management and therefore this command is simply a wrapper around GitHub login. This is a developer command assumes that the user is an Ersilia developer or model contributor.
catalog
[?OPT]
List the catalog of Ersilia models. By default, this command only shows the catalog of models available locally on a user's system, in an ASCII table on the user's terminal.
catalog
-l/--local
This is similar to using the catalog command by itself. It only lists models present locally on the user's system.
catalog
-f/ --file_name
Write the requested catalog to a given file.
catalog
-h/--hub
List all the models present in the Ersilia Model Hub. This command utilities the information maintained in a JSON file on Ersilia's servers.
catalog
--more/--less
Print more or less information about the catalog. When less information is requested, only the identifier and slug are displayed. Otherwise, the following fields are displayed: identifier, slug, title, task, input shape, output, output shape, and model source.
These flags work with both local and hub context.
catalog
--card
Displays the card for the specified model identifier. The requested model does not need to be available locally. Presently, only a single model can be requested.
catalog
-j, --as-json/ -t, --as-table
Displays the catalog in JSON format on the user's terminal. This may be helpful for downstream processing task. The default behavior to display the catalog in a tabular format. These flags can be used both in the local and hub context.
close
Closes the model running in the shell from which this command is executed. Does not close models running in other shells.
delete
[MODEL]
Deletes the model specified with its identifier.
delete
--all
Deletes all the models available on the user's system.
example
[?MODEL]
This command can sample inputs for a given model. By default, the command expects a model to be served in the current shell, otherwise a model needs to be explicitly specified. By default, five examples would be sampled for the model and displayed on the user's terminal. This behavior can be customized with relevant flags.
example
-n, --n_samples
Specify the number of example inputs to generate for the given model. Default value is five.
example
-f, --file_name
The file name to save the sampled example inputs. If not specified, the result is printed on the terminal.
example
-s, --simple / -c/--complete
Simple inputs only contain essential information such as input SMILES, while complete inputs contain the Inchi key and other fields such as the molecule's name.
example
-p, --predefined/-r, --random
If model source contains an example input file, when the predefined flag is set, then inputs are sampled from that file. Only the number of samples present in the file are returned, especially if --n_samples is greater than that number. Otherwise, by default, ersilia samples inputs randomly.
fetch
[MODEL]
Fetch a given ersilia model. Ersilia is smart enough to decide how to fetch this model, ie either using its Docker image, or from source - in most cases, if your Docker engine is active, a model is fetched using its image. However, this behavior can be overridden. When a model is re-fetched, Ersilia deletes all artifacts related to it, but for the sake of efficiency, the user is prompted to override this behavior when running this command.
fetch
[MODEL] --from_dir
Fetch the given model, from source, using a local path provided on the user's system. The path can be relative or absolute.
fetch
[MODEL] --from_github
Fetch the given model, from source, by cloning the GitHub repository of the model on the user's system.
fetch
[MODEL] --from_dockerhub
Fetch the given model using its Docker image maintained in Ersilia's public DockerHub registry
fetch
[MODEL] --from_s3
Fetch the given model, from source, using the model's code archive maintained on Ersilia's S3 storage servers.
fetch
[MODEL] --from_hosted
Fetch the given model, using the URL where the model is hosted. This only creates a basic folder structure for the model, and the model is not actually downloaded.
fetch
[MODEL] [OPT] --overwrite/--reuse
This flag is useful from an efficiency perspective. When fetching a model from source, a conda environment is created, which can be retained and reused, or overwritten, when re-fetching a model.
fetch
[MODEL] [OPT] --with_bentoml
This is a developer specific command and most users will not need to use it. This command fetches a model from source, and packs it using BentoML. For that to happen, the model source needs to follow a specific structure.
fetch
[MODEL] [OPT] --with_fastapi
This is a developer specific command and most users will not need to use it. This command fetches a model from source, and packs it using Ersilia Pack, using FastAPI. For that to happen, the model source needs to follow a specific structure.
info
Print the model card, ie its information on the terminal, for a currently running model.
run
[?OPT]
Run the model currently served in the shell where this command is executed.
run
-i, --input
Specify the input file, which must be a CSV. Alternatively a single SMILES input can be specified. The input file should ideally have a header.
run
-o, --output
Specify the file to save the model predictions. This can be a CSV, TSV, or JSON file. If not specified, output is printed on the user's terminal in JSON format.
run
-b, --batch_size
Specify the batch size for generating model predictions.
run
--table
Print the model predictions in an ASCII table on the terminal.
serve
[MODEL] [?OPT]
Serve the given model.
serve
[MODEL] --output_source
This flag is used to interact with the pre-calculations store maintained by Ersilia. Currently this is work in progress.
serve
[MODEL] --lake/--no-lake
Ersilia caches model predictions locally using a local lake, because this flag is True by default. However this functionality can be overridden.
serve
-p, --port
The port to use when creating a model server. If unspecified, Ersilia looks for empty ports to use on the user's system.
serve
-t, --track
Whether the model's runs should be tracked to monitor for model and system performance. This telemetry data can be uploaded to S3 if the appropriate credentials are provided. Currently only Ersilia developers and other Ersilia tools have that privile
uninstall
Use this command to remove all Ersilia artifacts on the user's system.
Last updated