Client
cli
def cli(config)
pipeline
def pipeline(config, **kwargs)
Runs all components for which run=True in config file.
All activated (run=True) components from config file will be run in sequence. Options overwrite the config file. The config file is the only way to define pipeline components.
Args
- config-file: Central configuration file.
dataprep
def dataprep(config, **kwargs)
Run data preparation and create job dir.
Creates a directory (job_dir) with the following files:
-
train_samples.json
-
val_samples.json
-
test_samples.json
-
class_mapping.json
train
def train(config, **kwargs)
Train a CNN.
Fine-tunes an ImageNet pre-trained CNN. The number of classes are derived from train_samples.json. After each epoch the model will be evaluated on val_samples.json.
The best model (based on valuation accuracy) will be saved.
Args
-
image_dir: Directory with image files.
-
job_dir: Directory with train_samples, val_samples, and class_mapping.json.
evaluate
def evaluate(config, **kwargs)
Evaluate a trained model.
Evaluation will be performed on test_samples.json.
Args
-
image_dir: Directory with image files.
-
job_dir: Directory with test_samples.json and class_mapping.json.
cloud
def cloud(config, **kwargs)
Launch/destroy a cloud compute instance.
Launch/destroy cloud instances with Terraform based on Terraform files in tf_dir.