project_defaults.ini#
Contents:
# =====================
# Project configuration
# =====================
#
# The configuration of a project is managed via .ini files.
#
# For each project there needs to be a project config file, located in the
# project dir.
#
# For starters, a project will inherit all default settings from the
# :doc:`/file_viewers/project_defaults_ini_viewer` file, which is included in the
# orthoseg installation and is not supposed to be changed.
#
# In addition, you can create additional .ini files to combine shared settings
# so you can minimize the amount of settings you need to specify/copy-paste in
# your project config files.
#
# The configuration used for an orthoseg project is loaded in the following order:
#
# 1) the project defaults as "hardcoded" in the orthoseg package
# (:doc:`/file_viewers/project_defaults_ini_viewer`)
# 2) any .ini files specified in the :confval:`general.extra_config_files_to_load`
# key in your project config file, in the order specified.
# 3) the keys in your project config file.
#
# Keys specified in a config file loaded later in the order above
# overrule the corresponding key values specified in a previously
# loaded config file.
# General settings.
[general]
# Extra config files to load for the project.
#
# They will be loaded in the order specified and can be specified one
# path per line, comma seperated.
#
# Only the `extra_config_files_to_load` key of the .ini file being passed to
# orthoseg is used. If .ini files referenced in `extra_config_files_to_load` also
# define an `extra_config_files_to_load` key, it will be ignored.
#
# If a relative path is used it will be resolved towards the parent dir of
# the project config file.
#
# Example:
#
# .. code-block:: ini
#
# # Load a single extra config file to overrule defaults before this one.
# # If project_defaults_overrule.ini contains an `extra_config_files_to_load` key,
# # it will be ignored.
# extra_config_files_to_load = ../project_defaults_overrule.ini
#
# # Load two extra config files to overrule defaults before this one.
# extra_config_files_to_load =
# ../project_defaults_overrule.ini,
# ./sportsfields-sample.ini
#
# Type: string or list of strings
extra_config_files_to_load =
# The subject that will be segmented.
#
# This value must be overruled in the project specific config file.
segment_subject = MUST_OVERRIDE
# Specify the way certificates of ssl requests are verified.
#
# Options:
#
# * True: use the default certificate bundle as installed on your system
# * False: disable certificate validation (NOT recommended!)
# * path to a certificate bundle file (.pem) to specify the certificate
# bundle to be used. In corporate networks using a proxy server this is
# often needed when requests give CERTIFICATE_VERIFY_FAILED errors.
ssl_verify = True
# Specify the number of cpu's to use while doing heavy processing.
#
# If -1, it uses all available processors.
nb_parallel = -1
# Settings regarding the download action.
[download]
# Schedule to control when images can be downloaded.
#
# The schedule is specified in `cron format <https://en.wikipedia.org/wiki/Cron>`_,
# which is a string with 5 fields separated by spaces: minute, hour, day of month,
# month, day of week. Each field can be either a single value, a range of values,
# a list of values, a list of ranges, or a wildcard (*).
#
# If no schedule is specified there is no time limitation.
#
# Example:
#
# # Images are fetched every day, but only from 16:00 till 8:59.
# cron_schedule = * 16-23,0-8 * * *
#
# Type: str (cron schedule)`
cron_schedule
# Settings concerning the model you want to use for the segmentation.
[model]
# The id of the architecture used.
#
# Only needs to be changed if you want to compare the results of different
# architectures on the same training data, bacause orthoSeg will only train
# one model per traindata_id, architecture_id and hyperparams_id.
#
# If the architecture_id is 0, it won't be included in the file name
# of trained models.
architecture_id = 0
# The segmentation architecture to use.
#
# The architectures currently supported by orthoseg follow the encoder-decoder
# principle:
#
# * encoder: a (deep) neural network that detects features on object level
# * decoder: a (deep) neural network that converts the detected features
# on object level to a segmentation on pixel level
#
# To configure an encoder/decoder architecture, specify it in
# the following way: architecture = {encoder}+{decoder}
#
# The supported encoder and decoders can be found in
# :doc:`../user_guide/3_finetune_your_project`.
architecture = inceptionresnetv2+unet
# The number of channels of the images to train on.
nb_channels = 3
# Settings concerning the train process.
[train]
# Preload model -> only overrule in local_overrule.ini.
preload_with_previous_traindata = False
# Force to use a model trained on this traindata version (-1 to disable).
force_model_traindata_id = -1
# When training, resume training on the current best existing model.
resume_train = False
# Train a model, even if a model exists already.
force_train = False
# The id of the set of hyper parameters to use while training.
#
# Needs to be changed if you want to compare the results of different
# hyperparameter sets on the same training data because orthoSeg will only
# train one model per traindata_id, architecture_id and trainparams_id.
#
# If the hyperparams_id is 0, it won't be included in the file name of
# trained models.
trainparams_id = 0
# The width of the images to train on in pixels.
#
# .. note::
#
# The keys image_pixel_width, image_pixel_height, image_pixel_x_size
# and image_pixel_y_size will determine the size the label location boxes will
# need to be digitized.
#
# E.g. if `image_pixel_width` = 512 and `image_pixel_x_size` = 0.25, the boxes
# need to be 512 pixels * 0.25 meter/pixel = 128 meter wide.
#
# .. note::
#
# For some model architectures there are limitations on the image sizes supported.
# E.g. if you use the linknet decoder, the images pixel width and height
# has to be divisible by factor 32.
image_pixel_width = 512
# The height of the images to train on in pixels.
image_pixel_height = 512
# The size of a pixel in the x direction.
#
# The size is in the units of the coordinate system the layer is in. This will in
# most cases be in meters.
image_pixel_x_size = 0.25
# The size of a pixel in the y direction.
#
# The size is in the units of the coordinate system the layer is in. This will in
# most cases be in meters.
image_pixel_y_size = 0.25
# Pattern how the file paths of the `polygons` label files should be formatted.
#
# The `image_layer` to get the images from is extracted from the file path. Hence,
# the image layer will need to be configured in the :doc:`/reference_docs/image_layers_config`.
labelpolygons_pattern = ${dirs:labels_dir}/${general:segment_subject}_{image_layer}_polygons.gpkg
# Pattern how the file paths of the `locations` label files should be formatted.
#
# The `image_layer` to get the images from is extracted from the file path. Hence,
# the image layer will need to be configured in the :doc:`/reference_docs/image_layers_config`.
labellocations_pattern = ${dirs:labels_dir}/${general:segment_subject}_{image_layer}_locations.gpkg
# Column where the labels for each training polygon is available.
#
# For backwards compatibility, if the column name configured here is not available,
# column "label_name" is used if it exists.
labelname_column = classname
# The datasources to use for the train labels.
#
# Typically, this property does not need to be set, as the datasources used for training
# are found automatically in the :confval:`dirs.labels_dir` via the patterns specified
# in :confval:`train.labelpolygons_pattern` and :confval:`train.labellocations_pattern`.
#
# However, this property can be used to add label datasources in addition to the ones
# found via the patterns.
#
# The datasources are specified in a dict of dicts, with the datasource names as keys
# and for each datasource a dict with the following properties as value:
#
# `locations_path`: the file path to the label locations file of this datasource.
# `polygons_path`: the file path to the label polygons file of this datasource.
# `image_layer`: the image layer to use for this datasource.
# `pixel_x_size`: the size of a pixel in the x direction for this datasource.
# `pixel_y_size`: the size of a pixel in the y direction for this datasource.
#
# It is also possible to overrule properties of label datasources found
# via the patterns. In this case, (only) the ``locations_path`` is mandatory and
# it will be used to link the datasource here with the corresponding one found via
# the patterns. All other properties specified will overrule the default values for
# this datasource found via the patterns. The properties that can be overruled are:
#
# - `pixel_x_size`: overrules :confval:`train.image_pixel_x_size` for this datasource.
# - `pixel_y_size`: overrules :confval:`train.image_pixel_y_size` for this datasource.
# - `image_layer`: overrule the image layer found in the file path of the locations
# file for this datasource.
#
# It is possible to specify the same file multiple times as datasource. This way, the
# same locations/polygons files can be used multiple times to train the model. This can
# be used to train the model in multiple resolutions.
#
# Note that even though it is also possible to overrule the image layer, typically the
# train polygons will be digitized for/on a specific image layer. Hence, overruling
# the image layer most often won't make sense.
#
# Example:
#
# .. code-block:: python
#
# # Add overrules for the "..._BEFL-2019_locations.gpkg" train locations file found
# # in :confval:`dirs.labels_dir` so the train locations/polygons will be used twice
# # for training: once in 0.5 meter/pixel and once in 0.25 meter/pixel
# label_datasources = {
# "label_2019_res1": {
# "locations_path": "${dirs:labels_dir}/${general:segment_subject}_BEFL-2019_locations.gpkg",
# "pixel_x_size": 0.5,
# "pixel_y_size": 0.5,
# },
# "label_2019_res2": {
# "locations_path": "${dirs:labels_dir}/${general:segment_subject}_BEFL-2019_locations.gpkg",
# "pixel_x_size": 0.25,
# "pixel_y_size": 0.25,
# }
# }
#
# Type: dict
label_datasources
# The augmentations to apply to the input images during training.
#
# Remarks:
#
# * the default value for cval is 0, which means that areas outside the image
# after rotation/translation/zoom will be filled with value 0 (black). If
# your subject can have area's that are black and need to be detected, you
# might want to set cval to e.g. 255 (white).
# * for orthoseg >= 0.8, rescaling should be handled by the default
# `preprocess_input` function of the model (architecture) if needed, so using
# 'rescale' augmentation is not allowed anymore.
image_augmentations = { "fill_mode": "constant",
"cval": 0,
"rotation_range": 359.0,
"width_shift_range": 0.05,
"height_shift_range": 0.05,
"zoom_range": 0.1,
"brightness_range": [0.95, 1.05]
}
# The augmentations to apply to the label masks during training.
#
# Remarks:
#
# * the number of randomized values must be the same as for the image,
# otherwise the random augentation factors aren't the same as the image!
# * augmentations to translate, rotate,... should be the same as for the image!
# * the mask generally shouldn't be rescaled!
# * cval values should always be 0 for the mask, even if it is different for
# the image, as the cval of the mask refers to these locations being
# of class "background".
mask_augmentations = { "fill_mode": "constant",
"cval": 0,
"rotation_range": 359.0,
"width_shift_range": 0.05,
"height_shift_range": 0.05,
"zoom_range": 0.1,
"brightness_range": [1.0, 1.0]
}
# The classes to be trained to.
#
# They should be specified using a dictionary with the class names to be detected
# as keys. For each class following properties need to be specified:
#
# * a list of label names in the training data to use for this class. Because this
# is a list, you can easily map multiple label names in the training data to the
# same class.
# * the weight to use for the class when training
#
# The class name "background" is mandatory and is reserved for the background class.
classes = { "background": {
"labelnames": ["ignore_for_train", "background"],
"weight": 1
},
"${general:segment_subject}": {
"labelnames": ["${general:segment_subject}"],
"weight": 1
}
}
# The batch size to use during fit of model.
#
# A proper value depends on available hardware, model used and image size.
batch_size_fit = 6
# The batch size to use while predicting in the train process.
#
# A proper value depends on available hardware, model used and image size.
batch_size_predict = 20
# The type of pretrained weights to initialize the model with.
#
# Options are:
#
# - **aerial**: the entire model (except the top layer) is initialized with weights
# that were the result of training the model on aerial images. These weights are
# only available for a limited number of model architectures. If they are not
# available for the :confval:`model.architecture` configured, an error is raised.
# The supported architectures are: `inceptionresnetv2+unet`, `mobilenetv2+linknet`.
# - **imagenet**: use imagenet pretrained weights for the encoder/backend of the model.
# The segmentation head/decoder is initialized with random weights.
# - **aerial_if_available**: use aerial pretrained weights if they are available for the
# architecture configured, otherwise use `imagenet` pretrained weights.
# - **None**: if you specify an empty `weights_type` key, no pretrained weights are
# used.
#
# .. note::
#
# You can also specify your own pretrained weights by putting them in the
# :confval:`dirs.weights_dir` and specifying your own custom weights type here.
# The file name of the weights file needs to follow the following format:
# ``{architecture}_{weights_type}_notop.weights.h5``, e.g.
# ``inceptionresnetv2+unet_customweights_notop.weights.h5``.
# You can use the ``segmodels_keras.utils.save_model_weights_notop`` function
# to save the weights of an existing model in the correct format.
weights_type = aerial_if_available
# Optimizer to use for training.
#
# You can specify any optimizer supported by keras (case-sensitive!):
# https://keras.io/3/api/optimizers/.
#
# For keras >= 3, AdamW is the default because it gives slightly better results. For
# keras 2, Adam is the default because AdamW gives an error when training starts.
optimizer
# Parameters to use for the optimizer.
optimizer_params = { "learning_rate": 0.0001 }
# Loss function to use.
#
# If not specified, the defaults are:
#
# - **For keras 3+**: ``categorical_focal_crossentropy``
# - **For keras <3**:
# - If weights specified in the classes: ``weighted_categorical_crossentropy``
# - If no weights are specified: ``categorical_crossentropy``
loss_function
# The metric(s) to monitor to evaluate which network is best during training.
#
# This can be a single metric or a formula with placeholders
# to calculate a value based on multiple metrics. Available metrics:
#
# - ``one_hot_mean_iou``: intersection over union on the training dataset
# - ``val_one_hot_mean_iou``: intersection over union on the validation dataset
# - ``categorical_accuracy``: accuracy on the training dataset
# - ``val_categorical_accuracy``: accuracy on the validation dataset
monitor_metric = ({one_hot_mean_iou}+{val_one_hot_mean_iou})/2
# The mode of the monitor metric.
#
# Use max to keep the models with a high monitor_metric. Otherwise use min.
monitor_metric_mode = max
# Format to save the trained model in.
#
# Options are keras, h5 or tf. The keras format is only supported for keras >= 3.
# Defaults to keras for keras >= 3 and to h5 for older versions.
save_format
# True to only keep the best model during training.
save_best_only = True
# The minimum accuracy to save the model.
#
# Set to 0 to always save the model.
save_min_accuracy = 0.80
# Number of epochs to train with the pretrained layers frozen.
#
# Keeps pretrained layers intact, which is useful for the first few (2-10) epochs when
# big adjustments are made to the untrained layers of the network. For architectures
# with pretrained weights available for the entire model, the default (5) is often
# sufficient. For architectures with pretrained weights only for the encoder, covergence
# is slower and values up to 20 can be useful. Training is also 20% faster during the
# epochs with frozen layers.
nb_epoch_with_freeze = 5
# Maximum number of epochs to train.
#
# These epochs are in addition to nb_epoch_with_freeze.
max_epoch = 1000
# Stop training after this number of epochs without improvement.
#
# Not having improvement means the `earlystop_monitor_metric` hasn't improved.
earlystop_patience = 100
# Metric to use to determine that the model doesn't improve.
#
# Options are: categorical_accuracy, one_hot_mean_iou
earlystop_monitor_metric = one_hot_mean_iou
# The mode of the earlystop metric.
#
# Use max if the monitor_metric should be high. Otherwise use min.
earlystop_monitor_metric_mode = max
# True to activate tensorboard style logging.
log_tensorboard = False
# True to activate csv logging.
log_csv = True
# Subdir name to save augmented images to while training.
#
# This should only be used for debugging purposes as it can
# take a lot of disk space and slow down training.
save_augmented_subdir
# Settings concerning the prediction process.
[predict]
# The batch size to use while predicting.
#
# A proper values depends on available hardware, model used and image size.
batch_size = 4
# The image layer to use for the prediction.
#
# The image layer needs to be an existing layer in imagelayers.ini.
image_layer = MUST_OVERRIDE
# Image width in pixels to use when running a prediction.
#
# .. note::
#
# For some model architectures there are limitations on the image sizes
# supported. E.g. if you use the linknet decoder, the images pixel width
# and height has to be divisible by factor 32.
image_pixel_width = 2048
# Image height in pixels to use when running a prediction.
image_pixel_height = 2048
# The size of a pixel in the x direction.
#
# The size is in the units of the coordinate system the layer is in. This will in
# most cases be in meters.
image_pixel_x_size = 0.25
# The size of a pixel in the y direction.
#
# The size is in the units of the coordinate system the layer is in. This will in
# most cases be in meters.
image_pixel_y_size = 0.25
# The number of pixels to overlap between the image tiles for prediction.
#
# This is needed to avoid edge effects in the prediction. The optimal value depends
# on the amount of context needed to accurately segment the subject involved.
# E.g. for small opjects to be segmented, typically a smaller overlap will be enough,
# while for large objects, a larger overlap might be needed.
image_pixels_overlap = 128
# The minimum probability for a pixel to be attributed to a class.
#
# If the probability for all classes is below this threshold, the pixel will
# be attributed to the background.
#
# Possible values are from 0.0 till 1.
min_probability = 0.5
# Maximum errors that can occur during prediction before stopping the process.
max_prediction_errors = 100
# Apply a filter to the background pixels and replace background by the most
# occuring value in a rectangle around the background pixel of the size
# specified.
filter_background_modal_size = 0
# Query to specify polygons to be reclassified.
#
# All detected polygons that comply to the query provided will be reclassified
# to the class of the neighbour with the longest border with it.
#
# The query need to be in the form to be used by pandas.DataFrame.query() and
# the following columns are available to query on:
#
# - area: the area of the polygon, as calculated by GeoSeries.area .
# - perimeter: the perimeter of the polygon, as calculated by GeoSeries.length .
# - onborder: 1 if the polygon touches the border of the tile being predicted, 0 if
# it doesn't. It is often useful to filter with onborder == 0 to avoid eg. polygons
# being reclassified because they are small due to being on the border.
#
# Example:
#
# `reclassify_to_neighbour_query = (onborder == 0 and area <= 5)`
reclassify_to_neighbour_query
# Algorithm to use for vector simplification.
#
# The simplification configured here will be executed on the fly during the
# prediction. Options are:
#
# * RAMER_DOUGLAS_PEUCKER:
# * `simplify_tolerance`: extra, mandatory key: specifies the distance
# tolerance to be used.
# * VISVALINGAM_WHYATT:
# * `simplify_tolerance`: extra, mandatory key: specifies the area
# tolerance to be used.
# * LANG: gives few deformations and removes many points
# * `simplify_tolerance`: extra, mandatory key: specifies the distance
# tolerance to be used.
# * `simplify_lookahead`: extra, mandatory key: specifies the number
# of points the algorithm looks ahead during simplify.
# * LANG+: gives few deformations while removeing the most points.
# * `simplify_tolerance`: extra, mandatory key: specifies the distance
# tolerance to be used.
# * `simplify_lookahead`: extra, mandatory key: specifies the number
# of points the algorithm looks ahead during simplify.
# * If `simplify_algorithm` is not specified, no simplification is applied.
simplify_algorithm = LANG+
# Tolerance to use for the on-the-fly simplification during the prediction.
#
# Remark: you can use simple math expressions, eg. 1.5*5
simplify_tolerance = ${image_pixel_x_size}*1.5
# The number of points to look ahead during simplify.
#
# Only applicable for the LANG algorithm.
simplify_lookahead = 8
# Use topological simplification.
#
# If True, the resulting polygons of the classification are converted to
# topologies so no gaps are introduced in polygons that are next to each other.
# If not specified (= None), a multi-class classification will be simplified
# topologically, a single class will be simplified the standard way.
simplify_topological
# Settings concerning the postprocessing after the prediction.
[postprocess]
# Keep the original output file of the prediction after postprocessing.
keep_original_file = True
# Keep the intermediary files of the postprocessing.
keep_intermediary_files = True
# Dissolve the result.
#
# Because the predictions are done on tiled input images, the "raw" result
# will be tiled in the size of the prediction images.
#
# If dissolve is True, adjacent polygons of the same class are merged to one
# polygon, but no multipolygons are created.
#
# For some subjects, dissolving can lead to huge polygons that are hard to
# handle and visualize because they are entirely connected. Examples are e.g.
# road networks, water bodies,... For these subjects, it can be better to disable
# dissolve or use a :confval:`postprocess.dissolve_tiles_path`.
dissolve = True
# Tile the result of the dissolve using the grid in the file specified.
#
# This key is only applicable if :confval:`postprocess.dissolve` is True.
#
# If specified, the result of the dissolve will be tiled using the grid in the
# file provided.
#
# This is useful if you want the result to be tiled to avoid huge polygons, but
# when you would like to have another tiling scheme used in the output than the
# tiles used during the prediction.
dissolve_tiles_path
# Query to specify polygons to be reclassified.
#
# All detected polygons that comply to the query provided will be reclassified
# to the class of the neighbour with the longest border with it.
#
# The query need to be in the form to be used by pandas.DataFrame.query() and
# the following columns are available to query on:
#
# - area: the area of the polygon, as calculated by GeoSeries.area .
# - perimeter: the perimeter of the polygon, as calculated by GeoSeries.length .
# - onborder: 1 if the polygon touches the border of the tile being predicted, 0 if
# it doesn't. It is often useful to filter with onborder == 0 to avoid eg. polygons
# being reclassified because they are small due to being on the border.
#
# Example:
#
# `reclassify_to_neighbour_query = (onborder == 0 and area <= 5)`
reclassify_to_neighbour_query
# Apply simplify (also) after dissolve.
#
# For more information, check out :confval:`predict.simplify_algorithm`.
simplify_algorithm
# Tolerance to use for the postprocess simplification.
#
# Remark: you can use simple math expressions, eg. `1.5*5`.
simplify_tolerance = ${predict:image_pixel_x_size}*2
# The number of points to look ahead during simplify.
#
# Only applicable if :confval:`postprocess.simplify_algorithm` is LANG.
simplify_lookahead = 8
# Settings concerning the directories where input/output data is found/put.
#
# Remarks:
#
# * UNC paths are not supported on Windows, always use mapped drive letters!
# * always use forward slashes, even on Windows systems
# * in all paths, it is possible to use the {tempdir} placeholder, which will
# be replaced by the default system temp dir.
[dirs]
# The base projects directory.
#
# Here, multiple orthoseg projects can be stored. Can either be:
#
# * an absolute path
# * OR a relative path starting from the location of the specific projectconfig
# file of the project
#
# Eg.: ".." means: projects_dir is the parent dir of the dir containing the
# project config file.
projects_dir = ..
# The directory where the pretrained weights are cached.
#
# The weights specified in the :confval:`train.weights_type` key will be
# downloaded and cached in this directory if they aren't available yet. If you want to
# use your own pretrained weights, you can put them in this directory and specify the
# weights type name of the file in the :confval:`train.weights_type` key.
# More information on this can be found in the documentation of the
# :confval:`train.weights_type` key.
weights_dir = ${projects_dir}/_weights
# The base directory to cache images we want predictions for.
base_image_dir = ${projects_dir}/_image_cache
# The directory name for the cached tiled images we want predictions for.
predict_image_input_subdir = ${predict:image_pixel_width}x${predict:image_pixel_height}_${predict:image_pixels_overlap}pxOverlap
# The full directory path for the cached tiled images we want predictions for.
predict_image_input_dir = ${base_image_dir}/${predict:image_layer}/${predict_image_input_subdir}
# The base directory where predictions are saved.
#
# .. note::
#
# In recent version of orthoseg, the output is saved directly to vector files
# rather than (first) to raster files.
predict_image_output_basedir = ${predict_image_input_dir}
# Directory name to save prediction of the images used during training to.
#
# These prediction are a convenient way to find errors in the training dataset
# and check the training quality.
#
# .. note::
#
# Because the images predicted here are images used for training, the train
# image size is used by default.
predictsample_image_input_subdir = ${train:image_pixel_width}x${train:image_pixel_height}
# The full directory path to save the predictions on the training images to.
predictsample_image_input_dir = ${base_image_dir}/${predict:image_layer}_testsample/${predictsample_image_input_subdir}
# The base directory to save the predictions on the training images to.
predictsample_image_output_basedir = ${predictsample_image_input_dir}
# The project directory for this subject.
project_dir = ${projects_dir}/${general:segment_subject}
# The log directory for the project.
log_dir = ${project_dir}/log
# The directory containing the label data.
labels_dir = ${project_dir}/labels
# Directories used to put data during training .
training_dir = ${project_dir}/training
# The directory where models are saved².
model_dir = ${project_dir}/models
# Output vector directory.
output_vector_dir = ${project_dir}/output_vector/${predict:image_layer}
# Settings concerning some specific file paths.
[files]
# File path that will be used to save/load the keras model definition.
model_json_filepath = ${dirs:model_dir}/${model:architecture}.json
# File path where the image layers configuration file is located.
image_layers_config_filepath = ${dirs:projects_dir}/imagelayers.ini
# File path of file that if it exists cancels the current processing.
cancel_filepath = ${dirs:projects_dir}/cancel.txt
# Email config to use to send progress info to.
[email]
# Set enabled to True to enable sending mails.
enabled = False
# Email address to send task status info from.
from = sample@samplemail.be
# Email address to send task status info to.
to = sample@samplemail.be
# Smtp server to use .
smtp_server = server.for.emails.be
# Username to use to login to smtp server (in some cases optional).
mail_server_username =
# Password to use to login to smtp server (in some cases optional).
mail_server_password =
# Logging configuration.
[logging]
# The number of log files to keep in a log dir.
nb_logfiles_tokeep = 30
# Config to use for the logging.
#
# This config is in json, following the conventions as required by
# logging.dictConfig.
# https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
logconfig = {
"version": 1,
"disable_existing_loggers": true,
"formatters": {
"console": {
"format": "%(asctime)s.%(msecs)03d|%(levelname)s|%(name)s|%(message)s",
"datefmt": "%H:%M:%S"
},
"file": {
"format": "%(asctime)s|%(levelname)s|%(name)s|%(message)s",
"datefmt": null
}
},
"handlers": {
"console": {
"level": "INFO",
"class": "logging.StreamHandler",
"formatter": "console",
"stream": "ext://sys.stdout"
},
"file": {
"level": "INFO",
"class": "logging.handlers.RotatingFileHandler",
"formatter": "file",
"filename": "_log/{iso_datetime}.log",
"maxBytes": 10000000,
"backupCount": 3
}
},
"loggers": {
"geofile_ops": {
"level": "INFO",
"handlers": ["console"],
"propagate": false
},
"geofile_ops.geofile_ops": {
"level": "DEBUG",
"handlers": ["console"],
"propagate": false
}
},
"root": {
"level": "INFO",
"handlers": ["console", "file"]
}
}
# Configuration to manage the cleanup of old models, trainings and predictions.
[cleanup]
# When simulate is True, no files are actually deleted, only logging is written.
simulate = False
# The number of versions to retain the models for.
#
# If <0, all versions are retained.
model_versions_to_retain = -1
# The number of version the retain the training data directories for.
#
# If <0, all versions are retained.
training_versions_to_retain = -1
# The number of versions to retain the prediction files for.
#
# If <0, all versions are retained.
prediction_versions_to_retain = -1