files
#
Often model paramaters or other configurations such as topology are stored
in files that are required to load a model and make predictions with it. You
can define multiple files per model and these will be available in the model
runtime
.
Example
Here is an example of defining 2 model files - one local config file which will be uploaded to Efemarai and a remote S3 weights file.
files:
- name: config
url: models/yolor_config.yaml
upload: True
- name: params
url: s3://trained-models/yolor_p6.pt
credentials: "${AWS_KEY}:${AWS_SECRET}" # environment variables
Properties
files
is a sub-field of each model in models
and it is an array.
Each element describes a file containing model-related information - e.g.
parameter values or model-specific configurations. Each element in files
has the
following properties:
name
: unique name of the file which can be used in the modelruntime
to refer to that file. It can contain only letters and underscores.url
: URL from where the file can be read. Depending on the URL scheme andcredentials
(see bellow) the file can be fetched from various locations including:s3://bucket/key
- AWS bucketgs://bucket/key
- GCP bucketazure://bucket/key
- Azure buckethdfs://path/file
- Hadoop file systemssh://path/file
- via SSHscp://path/file
- via SSHsftp://path/file
- via SSHlocal/path/file
- requiresupload=True
(see bellow)
credentials
(optional): contains a string of the formusername:password
oraccess_token
that’s used for authentication when the file is to be accessed remotely (e.g. from an S3 bucket). In order to avoid keeping the credentials in plain text one can provide them as environment variables as shown in the example above.upload
(optional): upload the file to Efemarai - typically set toTrue
when anurl
points to a local file on the user machine.