Define Jobs

This page explains how to create a job for training and validation

The training and validation jobs have to be created in a standardized format which is described below. Once the following structure is adopted and implemented, zip the files and upload it on our platform to start the process.

Structure

File Structure:

  • input.json - This file contains the job configuration details like name, task, sites, etc.

  • nn.py - This file contains the neural network code.

  • nnMetrics.py - This file contains the code for optimizers, loss functions, transformation functions and metrics related to the training and validation process.

  • dataLoader_{site}.py - This file contains the code for how data is loaded at each data site. The {site} in dataLoader_{site}.py stands for the site ID for which the data loader is written. There should be one data loader file for each site. For eg. if there are 3 sites with ID 1,2,3, then there will be 3 data loader files with names dataLoader_1.py, dataLoader_2.py, dataLoader_3.py.

File Description

You can find sample text on each file below. For an in-depth understanding on customisation, please visit the next pages which contain a proper description on what each value represents in the files and how to customise them.

1. input.json

{
    "name": "TrainCNN_V1",
    "task": "train",
    "sites": "site-1,site-2",
    "rounds": "2",
    "nnClass": "MobileNetCNN",
    "site-1": {
        "aggregation_epochs": 2,
        "lr": 0.01,
        "batch_size": 8,
        "data_size": 15,
        "train_test_split": 0.3,
        "balanced_class_train": "true"
    },
    "site-2": {
        "aggregation_epochs": 2,
        "lr": 0.01,
        "batch_size": 8,
        "data_size": 15,
        "train_test_split": 0.3,
        "balanced_class_train": "true"
    }
}

2. nn.py

3. nnMetrics.py

4. dataLoader_{site}.py - Eg. dataLoader_1.py

Please checkout the next pages for an in-depth explanation on each file.

Last updated