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.


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.

      - name: config
        url: models/yolor_config.yaml
        upload: True

      - name: params
        url: s3://trained-models/
        credentials: "${AWS_KEY}:${AWS_SECRET}"  # environment variables


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 model runtime 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 and credentials (see bellow) the file can be fetched from various locations including:

    • s3://bucket/key - AWS bucket

    • gs://bucket/key - GCP bucket

    • azure://bucket/key - Azure bucket

    • hdfs://path/file - Hadoop file system

    • ssh://path/file - via SSH

    • scp://path/file - via SSH

    • sftp://path/file - via SSH

    • local/path/file - requires upload=True (see bellow)

  • credentials (optional): contains a string of the form username:password or access_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 to True when an url points to a local file on the user machine.