client.jobs.submit_azureblob

Submit a job using Azure blob files as inputs

client.jobs.submit_azureblob(model, version, sources, storage_account, storage_account_key, explain=False)

Submit a job with data files stored in Azure Blob containers, the sources dictionary is a double dict structure as follows:

{
  '<<<<input-item-key>>>>': {
    '<<<<data-input-item-key>>>>: {
      'container': '<<azure_blob_container>>',
      'filePath': '<<file_path>>'
    }
  }
}

Where:

<<<<input-item-key>>>>: are user defined keys to identify the input items.
<<<<data-input-item-key>>>>: are model defined keys (usually file names).

Parameters

Parameter

Type

Description

Example

model

str
Model

Model identifier provided by Modzy or a model object previusly loaded.

'ed542963de'

version

str

The model’s version number. It follows the semantic versioning format.

'1.0.1'

sources

dict

A mapping of source names to data sources. Each source should be a mapping of model input filename to Azure Blob container name and filepath.

'{'my-input': {'input.txt': {'container': 'azure_blob_container', 'filePath': 'path/to/some_file.txt'}}}'

storage_account

str

Azure Storage Account name.

'StorageAccountName

storage_account_key

str

Azure Storage Account name key.

'StorageAccountKey

explain

bool

If the model supports explainability, flag this job to return an explanation of the predictions

True

Returns

A Job object with the status from the server

{
  "job_identifier": "string",
  "status",
  "account_identifier": "string",        
  "explain": "boolean",        
  "created_at": "date-time",
  "updated_at": "date-time",
  "submitted_at": "date-time",
  "submitted_by": "string",        
  "pending": "integer",
  "completed": "integer",    
  "failed": "integer",
  "total": "integer",    
  "model": {
    "identifier": "string",
    "version": "string",
    "name": "string"
  },
  "job_inputs": ["string"],
  "user": {
    "identifier": "string",
    "external_identifier": "string",
    "email": "string",
    "firstName": "string",      
    "lastName": "string",
    "status": "string",
    "title": "string"
    "access_keys": [
        {
            "prefix": "string",
        "is_default": "boolean"
        }
    ]                        
  }
}

Examples

>>>sources = {'my-input': {'input.txt': {'container': 'azure-blob-container', 'filePath': 'path/to/some_file.txt'}}}
>>>job = client.jobs.submit_azureblob('ed542963de', '0.0.27', sources, 'AZURE_STORAGE_ACCOUNT', 'AZURE_STORAGE_ACCOUNT_KEY')
>>>job.job_identifier
'14856eb1-0ad8-49e7-9da3-887acb80fea5'
>>>job.status
'SUBMITTED'

Did this page help you?