diff --git a/mindinsight/lineagemgr/api/model.py b/mindinsight/lineagemgr/api/model.py index d22f7a0650b07eca3838b42e447ffaa11a88408a..f5d64faa3bf31780e86acba3c00fd9936b13e663 100644 --- a/mindinsight/lineagemgr/api/model.py +++ b/mindinsight/lineagemgr/api/model.py @@ -41,9 +41,9 @@ def get_summary_lineage(summary_dir, keys=None): summary_dir (str): The summary directory. It contains summary logs for one training. keys (list[str]): The filter keys of lineage information. The acceptable - keys are `metric`, `hyper_parameters`, `algorithm`, `train_dataset`, - `model`, `valid_dataset` and `dataset_graph`. If it is `None`, all - information will be returned. Default: None. + keys are `metric`, `user_defined`, `hyper_parameters`, `algorithm`, + `train_dataset`, `model`, `valid_dataset` and `dataset_graph`. + If it is `None`, all information will be returned. Default: None. Returns: dict, the lineage information for one training. @@ -112,10 +112,12 @@ def filter_summary_lineage(summary_base_dir, search_condition=None): directories generated by training. search_condition (dict): The search condition. When filtering and sorting, in addition to the following supported fields, fields - prefixed with `metric/` are also supported. The fields prefixed with - `metric/` are related to the `metrics` parameter in the training - script. For example, if the key of `metrics` parameter is - `accuracy`, the field should be `metric/accuracy`. Default: None. + prefixed with `metric/` and `user_defined/` are also supported. + For example, the field should be `metric/accuracy` if the key + of `metrics` parameter is `accuracy`. The fields prefixed with + `metric/` and `user_defined/` are related to the `metrics` + parameter in the training script and user defined information in + TrainLineage/EvalLineage callback, respectively. Default: None. - summary_dir (dict): The filter condition of summary directory. diff --git a/mindinsight/lineagemgr/collection/model/model_lineage.py b/mindinsight/lineagemgr/collection/model/model_lineage.py index 88a963814d1097dca3cf8245610cf844d6a13eb6..6d7291d6e3c7e82f9add933a02949e9a5829b5e5 100644 --- a/mindinsight/lineagemgr/collection/model/model_lineage.py +++ b/mindinsight/lineagemgr/collection/model/model_lineage.py @@ -56,6 +56,8 @@ class TrainLineage(Callback): raise_exception (bool): Whether to raise exception when error occurs in TrainLineage. If True, raise exception. If False, catch exception and continue. Default: False. + user_defined_info (dict): User defined information. Only flatten dict with + str key and int/float/str value is supported. Default: None. Raises: MindInsightException: If validating parameter fails. @@ -233,6 +235,8 @@ class EvalLineage(Callback): raise_exception (bool): Whether to raise exception when error occurs in EvalLineage. If True, raise exception. If False, catch exception and continue. Default: False. + user_defined_info (dict): User defined information. Only flatten dict with + str key and int/float/str value is supported. Default: None. Raises: MindInsightException: If validating parameter fails.