Authentication¶
Depending on the Configuration of A2ML, authentication will be with the A2ML Cloud or directly to providers.
A2ML Cloud¶
Authenticating with A2ML Cloud will soon allow you to have one account which manages all provider credentials. All providers can then be run without individual configuration.
CLI Login¶
You can login to the A2ML Cloud with the a2ml auth login
command.
$ a2ml auth login
You will be prompted for your A2ML service user and password.
Download Credentials¶
A2ML credentials can be downloaded as an auger.json
file from your organization's https://app.auger.ai/<project_name>/settings.
$ export AUGER_CREDENTIALS=~/auger.json
Note
This would be a JSON string of your credentials.
The auger.json
file can also be referred to by:
An environment variable called
AUGER_CREDENTIALS_PATH
An attribute path_to_credentials inside
config.yaml
Individual Providers¶
A2ML Cloud can manage the usage of Google Cloud AutoML or Azure AutoML for you. If set up on your own you must configure the underlying AutoML service corrrectly to be accessed from the server you are running.
To connect directly to any or all providers configure each individually.
Azure Provider¶
CLI Login¶
The Azure AutoML service allows browser login. Run any a2ml
command and a login URL will open in the default browser.
To explicitly login to azure run.
$ a2ml auth login -p azure
JSON File¶
To login programmatically without the browser use the service principal credentials.
Note
Follow the above directions to create an azure.json file with values specific to your account.
{
"subscription_id":"",
"directory_tenant_id":"",
"application_client_id":"",
"client_secret":""
}
$ export AZURE_CREDENTIALS=~/azure.json
Note
This would be a JSON string of your azure credentials.
The azure.json file can also be referred to by:
An environment variable called
AZURE_CREDENTIALS_PATH
- should contain a full path to the fileAn attribute path_to_credentials inside
config.yaml
Google Cloud Provider¶
If you haven't run Google Cloud AutoML, set up a service account and save the credentials to a JSON file which you store in your project directory. Then set up the GOOGLE_APPLICATION CREDENTIALS
environment variable to point to the saved file. For example:
$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/user/a2ml/automl.json"
For ease of use you can set up a default project ID to use with your project with the PROJECT_ID
environment variable. For example:
$ export PROJECT_ID="automl-test-237311"
Detailed instructions for setting up Google Cloud AutoML.