Package: auger-cli
Auger CLIA command line tool for theAuger AI platform.InstallationCreate Auger accountPlease create account and organization to start working with CLI:https://auger.ai/augersignupPythonLatest Python:https://www.python.org/downloads/release/python-373/Install pip:https://pip.pypa.io/en/stable/installing/Auger CLI python packagepip3installauger-cliAuger CLI sources# Pull latest versiongitclonegit@github.com:deeplearninc/auger-cli.gitcdauger-cli
pip3install.Usage scenariosHelpTo access the usage information, simply add the--helpoption to any command or sub-command. For example:$auger--help
Usage:auger[OPTIONS]COMMAND[ARGS]...Augercommandlineinterface.

Options:--helpShowthismessageandexit.

Commands:authAuthenticationwithAuger.experimentsManageAugerExperiments.orgsManageAugerOrganizations.helpinstancesDisplayavailableinstancetypesforclusters.clustersManageAugerClusters.projectsManageAugerProjects.$augerauth--help
Usage:augerauth[OPTIONS]COMMAND[ARGS]...

Options:--helpShowthismessageandexit.

Commands:loginLogintoAuger.logoutLogoutfromAuger.ExampleThe complete example iris config file described below can be found in experiments/iris_train folder.LoginThe first step you'll need to do is login to Auger with:augerauthloginNote you can login to a different Auger hub instance by passing the--urlargument:augerauthlogin--urlhttps://test-instance.auger.aiTo get current login information:augerauthwhoamiTo logout:augerauthlogoutOrganizationsOrganization allocates S3 bucket where all data can be stored between cluster runs.To start using it you should be a member of any organization, check it with:augerorgsTo create your own organization go tohttps://auger.ai:ExperimentsExperiment definitionTo start working with Auger experiment create folder with experiment name and place file 'auger_experiment.yml' there. This file contain definition of experiment.For more details seehttps://docs.auger.ai/docs/experiments/evaluation-optionsauger_experiment.yml fields:evaluation_options:
  # Path to file with data. May be URL or path in project files folder 
  # For Google drive use the following format: https://drive.google.com/uc?export=download&id=<shared file ID>
  data_path: files/iris_data_sample.csv

  # List of features from data file to be used to evaluate ML models
  feature_columns:
  - sepal_length
  - sepal_width
  - petal_length
  - petal_width

  # Target feature to build ML model for
  target_feature: class

  # If some of your features are strings, add them to the categoricals, so they will be one-hot encoded
  categorical_features:
  - class

  # If you want some categoricals whould be hashed instead of one-hot encoded add them to label encoded list
  label_encoding_features: []

  # List of features of datetime type
  datetime_features: []

  # List of time series features, usually one
  # If provided, when time series preprocessor and models will be used. See: https://docs.auger.ai/docs/next/machine-learning/timeseries
  time_series_features: []

  # Define type of ML models. true for 'classification', false for 'regression'
  classification: true

  # If target has two unique values, set it to true 
  binary_classification: false

  # Score used to optimize ML model.
  # Supported scores for classification: accuracy, f1_macro, f1_micro, f1_weighted, neg_log_loss, precision_macro, precision_micro, precision_weighted, recall_macro, recall_micro, recall_weighted
  # Supported scores for binary classification: accuracy, average_precision, f1, f1_macro, f1_micro, f1_weighted, neg_log_loss, precision, precision_macro, precision_micro, precision_weighted, recall, recall_macro, recall_micro, recall_weighted, roc_auc, cohen_kappa_score, matthews_corrcoef
  # Supported scores for regression: explained_variance, neg_median_absolute_error, neg_mean_absolute_error, neg_mean_squared_error, neg_mean_squared_log_error, r2, neg_rmsle, neg_mase, mda, neg_rmse

  scoring: accuracy

  # Number of K-folds: is a cross validation technique for splitting data into train/test
  cross_validation_folds: 5

  # Max Total Time Minutes, the maximum time in minutes an entire training can run for before it is stopped.
  max_total_time_mins: 60

  # Max Trial Time Minutes, this is the maximum time in minutes an individual fold in trial can run before it is stopped.
  max_eval_time_mins: 10

  # Max Trials, this is the maximum number of trials to be run before training stops.
  max_n_trials: 10

  # Build ensembles models after plain models completed. See : https://docs.auger.ai/docs/machine-learning/ensembles 
  use_ensemble: true

  # OPTIONAL evaluation parameters  

  # To see list of available algorithms call 'auger experiments search_space'
  #search_space: 
    # Use algorithm with parameters range defined in Auger ML
    #sklearn.ensemble.AdaBoostClassifier: {}

    # Modify some of algorithm parameters
    #sklearn.ensemble.GradientBoostingClassifier: {"max_depth": {"bounds": [10, 20]}}

    # Use limited set of algorithm parameters, all other parameters will be not tunable and set to default values
    #sklearn.ensemble.GradientBoostingClassifier: {'_no_default_params': True, "max_depth": {"bounds": [10, 20]}}

    # Add new parameter to algorithm. If one value is present, it will be passed as default value to algorithm
    #lightgbm.LGBMClassifier: {"feature_border_type": {"values": ['Median'], "type": "categorical", "tunable": True}}

  # To see list of available optimizers call 'auger experiments search_space'
  #optimizers_names: []

  #data_extension: ".csv"
  #data_compression: gzip

  #split_options: {}
  #oversampling: {}
  #use_ensemble: true
  #preprocessors: {}

# OPTIONAL parameters  

# Specify organization name, if you have more then one organization.
# By default Auger will use your first organization.
# Organization must exist. See Installation section
#organization: <organization name>

# Experiment name
# By default Auger will use folder name of auger_experiment.yml
# Will be generated automatically if not exists
#experiment: <experiment name>

# You may use one project/cluster for different experiments
# By default Auger will use folder name of auger_experiment.yml
# Will be generated automatically if not exists
#project: <project name>

# Cluster settings with default values
# cluster:
  # Number of nodes to run on cluster. Minimum of 2, the more workers deployed the more jobs that can be run in parallel.
  # workers_count : 2

  # To list available types call: `auger instances`
  # worker_type_id: 1

  # Number of workers per computer node. Setting it lower then CPU count, increase amoutn of memory available for worker
  # workers_per_node_count: 2

  # Cluster will be terminated after period of inactivity
  # autoterminate_minutes: 30Run experiment:augerexperimentsrunDisplay leaderboard from last run:augerexperimentsleaderboardDisplay individual model parameters from last run:augertrialsshow<id_from_leaderboard>To call predict using deployed model:augerexperimentspredict-p<pipelineid>-t<trialid>-f<csvfilepath>Pipeline ID is optional, if missed model with trial id will be automatically deployed
Trial ID to export model for the last experiment session, if missed best trial used.
CSV file path should point to local file with data for predcitionTo call predict using locally exported model:augerexperimentspredict-e-t<trialid>-f<csvfilepath>Pipeline ID is optional, if missed model with trial id will be automatically deployed
Trial ID to export model for the last experiment session, if missed best trial used.
CSV file path should point to local file with data for predcitionTo call predict proba using locally exported model:augerexperimentspredict-e-t<trialid>-f<csvfilepath>--threshold0.5Prediction data will contain additional proba_ columns per each target class.
Target calculation: if proba(class1) > threshold then class1 else class0To export model locally:augerexperimentsexport_model-t<trialid>Trial ID to export model for the last experiment session, if missed best trial used.Model zip file will be downloaded into models folder. Unzip it and see readme file inside how to use it.To deploy model to Auger HUB:augerexperimentsdeploy_model-t<trialid>Trial ID to export model for the last experiment session, if missed best trial used.Display information about experiment:augerexperimentsshowDisplay information about experiment settings:augerexperimentssettingsDisplay information about Auger ML oprimizers and algorithms:augerexperimentssearch_spaceClustersTo display cluster information.augerclustersshow<clusterid>To terminate cluster. It will free all paid AWS resources related with this cluster.augerclustersdelete<clusterid>ProjectsTo display project information.augerprojectsshow-p<projectname>To open project in web browser:augerprojectsopen_project-p<projectname>To download file from project cluster:augerprojectsdownload_file<remotepath>-l<localpath>-p<projectname>Remote path may be full path or relative path on cluster. For examble: files/iris_data_sample.csvLocal path is optional, by default file will be downloaded to 'files' folder in current directoryProject name is optional, if missed project name will be retrieve from auger_experiment.ymlTo read project log:augerprojectslogs<project_id>To Create project:augerprojectcreate--project<projectname>--organization-id<organizationid>The project name must be unique within the organization. This means that a project can be deployed to a cluster, the cluster can be terminated, and the project can be deployed to another one.NOTE:If you delete the project, another project with the same name can be used.To open project in the browser:augerprojectsopen-p<projectname>To delete project:augerprojectsdelete-p<projectname>Auger Python APITo start working with Auger Python API, follow installation instructions for Auger CLI.Getting startedCreate AugerClient and login:# To read login information from experiment dir:#config_settings={'login_config_path': "./iris_train"}# To use root user dir to read login information# You may specify any properties from auger_experiment.ymlconfig_settings={}# Read experiment setting from iris_train\auger_experiment.ymlclient=AugerClient(AugerConfig(config_dir="./iris_train",config_settings=config_settings))# To login to Auger:# You may login using CLI and store login credentials in user dir# OR login direcly# url is optional parameter, hub_url may be specified in config_settings#auth.login(client, "user", "pwd")Run experiment and wait for completion:# Experiment run, after finish, save experiment session parameters to .auger_experiment_session.ymlexperiments.run(client)whileTrue:leaderboard,info=experiments.read_leaderboard(client)ifinfo.get("Status")=='error':raiseException("Iris dataset train failed:%s"%info.get("Error"))ifinfo.get("Status")!='completed':time.sleep(5)continuebreakPredict using pipeline model:# Create pipeline based on best trialpipeline_id=experiments.export_model(client,trial_id=leaderboard[0]['id'],deploy=True)# Pipeline can ber reused multiple time, predict can be called without cluster runresult=experiments.predict_by_file(client,pipeline_id=pipeline_id,file='./iris_train/files/iris_data_test.csv',save_to_file=False)print(result[0])Predict using locally exported model:result=experiments.predict_by_file_locally(client,file='./iris_train/files/iris_data_test.csv',trial_id=leaderboard[0]['id'],save_to_file=False,pull_docker=True)print(result[0])Export model locally:# Export model to local zip file, see readme inside how to call predictfile_path=experiments.export_model(client,trial_id=leaderboard[0]['id'],deploy=False)How to update Python package:update version in setup.pycommit setup.pycreate tag with convention 'vX.X.X' (like v0.1.2)git tag v0.1.4git push --tagscircleci will build it and upload the tagged build to pypi.orgReview new package here:https://pypi.org/project/auger-cli/#history