diff --git a/mindinsight/lineagemgr/querier/query_model.py b/mindinsight/lineagemgr/querier/query_model.py index b797cdc111a7cdd73582e16d813e6526e072040a..3823cd747a1432cdb90a49ddc64dbe408611e5f0 100644 --- a/mindinsight/lineagemgr/querier/query_model.py +++ b/mindinsight/lineagemgr/querier/query_model.py @@ -35,6 +35,7 @@ FIELD_MAPPING = { "learning_rate": Field('hyper_parameters', 'learning_rate'), "epoch": Field('hyper_parameters', 'epoch'), "batch_size": Field('hyper_parameters', 'batch_size'), + "device_num": Field('hyper_parameters', 'device_num'), "loss": Field('algorithm', 'loss'), "model_size": Field('model', 'size'), "dataset_mark": Field('dataset_mark', None), diff --git a/tests/st/func/lineagemgr/api/test_model_api.py b/tests/st/func/lineagemgr/api/test_model_api.py index c824ee69547b8f11e933e0987a31b3e563d922b5..d50cad3df0d0023b08c6116a862bbffe05bfa54e 100644 --- a/tests/st/func/lineagemgr/api/test_model_api.py +++ b/tests/st/func/lineagemgr/api/test_model_api.py @@ -76,6 +76,7 @@ LINEAGE_FILTRATION_EXCEPT_RUN = { 'learning_rate': 0.11999999731779099, 'epoch': 10, 'batch_size': 32, + 'device_num': 2, 'loss': 0.029999999329447746, 'model_size': 64, 'metric': {}, @@ -97,6 +98,7 @@ LINEAGE_FILTRATION_RUN1 = { 'learning_rate': 0.11999999731779099, 'epoch': 14, 'batch_size': 32, + 'device_num': 2, 'loss': None, 'model_size': 64, 'metric': { @@ -120,6 +122,7 @@ LINEAGE_FILTRATION_RUN2 = { 'learning_rate': None, 'epoch': None, 'batch_size': None, + 'device_num': None, 'loss': None, 'model_size': None, 'metric': { diff --git a/tests/ut/lineagemgr/querier/test_querier.py b/tests/ut/lineagemgr/querier/test_querier.py index 6059b246252a4f7234fdac22361e4bc259170771..c1562bb39f98f74c08db779fe8546db99623e40c 100644 --- a/tests/ut/lineagemgr/querier/test_querier.py +++ b/tests/ut/lineagemgr/querier/test_querier.py @@ -93,6 +93,7 @@ def create_filtration_result(summary_dir, train_event_dict, "learning_rate": train_event_dict['train_lineage']['hyper_parameters']['learning_rate'], "epoch": train_event_dict['train_lineage']['hyper_parameters']['epoch'], "batch_size": train_event_dict['train_lineage']['hyper_parameters']['batch_size'], + "device_num": train_event_dict['train_lineage']['hyper_parameters']['device_num'], "loss": train_event_dict['train_lineage']['algorithm']['loss'], "model_size": train_event_dict['train_lineage']['model']['size'], "metric": metric_dict, @@ -208,6 +209,7 @@ LINEAGE_FILTRATION_5 = { event_data.EVENT_TRAIN_DICT_5['train_lineage']['hyper_parameters']['learning_rate'], "epoch": event_data.EVENT_TRAIN_DICT_5['train_lineage']['hyper_parameters']['epoch'], "batch_size": event_data.EVENT_TRAIN_DICT_5['train_lineage']['hyper_parameters']['batch_size'], + "device_num": event_data.EVENT_TRAIN_DICT_5['train_lineage']['hyper_parameters']['device_num'], "loss": event_data.EVENT_TRAIN_DICT_5['train_lineage']['algorithm']['loss'], "model_size": event_data.EVENT_TRAIN_DICT_5['train_lineage']['model']['size'], "metric": {}, @@ -231,6 +233,7 @@ LINEAGE_FILTRATION_6 = { "learning_rate": None, "epoch": None, "batch_size": None, + "device_num": None, "loss": None, "model_size": None, "metric": event_data.METRIC_5,