Remove references to sacred
This refactoring removes sacred and implement explicit configuration management using teklia-toolbox instead of relying on Sacred's magic configuration style (variable discovery).
The experiment now supports a list of JSON configuration files as input, merge them, and process them into a single configuration dictionary. There is no more params
nor global_params
section, even though they are still supported and will be promoted to the root level of configuration.
Here is a sample of the new supported configuration:
{
"batch_size": 4,
"bin_size": 20,
"classes_colors": [
[
0,
0,
0
],
[
0,
0,
255
]
],
"classes_names": [
"background",
"text_line"
],
"data_paths": {
"test": {
"image": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/test/images"
],
"json": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/test/labels_json"
]
},
"train": {
"image": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/train/images"
],
"json": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/train/labels_json"
],
"mask": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/train/labels"
]
},
"val": {
"image": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/val/images"
],
"json": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/val/labels_json"
],
"mask": [
"/home/bastien/dev/teklia/ufcn-datasets/data/DLA/IAM/val/labels"
]
}
},
"experiment_name": "iam",
"img_size": 768,
"learning_rate": 0.005,
"log_path": "runs/iam",
"mean": "mean",
"min_cc": 50,
"model_path": "model.pth",
"no_of_epochs": 200,
"no_of_params": null,
"prediction_path": "prediction",
"save_image": [
"val",
"test"
],
"std": "std",
"steps": [
"normalization_params",
"train",
"prediction",
"evaluation"
],
"tb_path": "events",
"training": {
"loss": "initial",
"restore_model": null
},
"use_amp": false
}
Edited by Bastien Abadie