krai / axs2mlperf

Automated KRAI X workflows for reproducing MLPerf Inference submissions
https://krai.ai
MIT License
1 stars 1 forks source link

Add `experiment_begin_timestamp` and `experiment_end_timestamp` for all experiments #25

Closed maria-18-git closed 1 year ago

maria-18-git commented 1 year ago

All loadgen experiments should be recorded simultaneously with the timestamp. experiment_begin_timestamp - time when experiment starts. experiment_end_timestamp - time when experiment stops.

So we need to add experiment_begin_timestamp and experiment_end_timestamp in the base class when we create output_entry and write it to output_entry .

maria-18-git commented 1 year ago

Added experiment_begin_timestamp to https://github.com/krai/axs2mlperf/tree/master/base_loadgen_program

Results:

maria@eb6 ~/work_collection/axs2mlperf (master *=)$ time axs byquery loadgen_output,task=image_classification,framework=onnxrt,loadgen_scenario=SingleStream,loadgen_mode=AccuracyOnly,model_name=resnet50,loadgen_dataset_size=20,loadgen_buffer_size=8,sut_name=eb6-kilt-qaic  
...

['^', 'byname', 'generated_by_image_classification_using_onnxrt_loadgen_on_get_b8c3ba7b4c1e4acba7ed1d91ddb2e640']
maria@eb6 ~/work_collection/axs2mlperf (master *=)$ vim ~/work_collection/generated_by_image_classification_using_onnxrt_loadgen_on_get_b8c3ba7b4c1e4acba7ed1d91ddb2e640/data_axs.json
...
"mlperf_model_name": "resnet50",
    "model_path": "/data/maria/work_collection/downloaded_resnet50_v1.onnx/resnet50_v1.onnx",
    "dataset_name": "imagenet",
    "program_name": "image_classification_using_onnxrt_loadgen",
    "experiment_begin_timestamp": "2023.10.19T09:44:36",
    ...
maria-18-git commented 1 year ago

As a solution we need to use get_and_return_on_success as a method to detect the end of experiments in shell (https://github.com/krai/axs2mlperf/tree/7b20949ffd3cdd3eab958e5fb70245db1e5039e0/base_loadgen_program, https://github.com/krai/axs/blob/c10d6a6c888434067f14f87170e75640fa3cc02e/core_collection/essentials_collection/shell/code_axs.py#L25).

"get_and_return_on_success": [ "^^", "case",[ [ "^^", "get", "symlink_to" ], [null, ""], null ], { "default_value": "postprocess_on_success" } ]

and to add register_end_timestamp in case of without power and link_to_power_and_register_end_timestamp in case of power.

Parameters register_end_timestamp and link_to_power_and_register_end_timestamp include adding and saving of experiment_end_timestamp. It allows us to generate and add experiment_end_timestamp in the end of experiment.

Examples how it works(experiment_begin_timestamp and experiment_end_timestamp)

real 1m30.738s user 3m27.600s sys 0m1.389s

maria-18-git commented 1 year ago

We have experiment_begin_timestamp and experiment_end_timestamp in "inside"(testing, ranging) experiments: Check timestamps:

maria@eb6 ~/work_collection/axs2mlperf/base_loadgen_program (master *=)$ time axs byquery power_loadgen_output,task=image_classification,framework=onnxrt,loadgen_scenario=SingleStream,loadgen_mode=AccuracyOnly,model_name=resnet50,loadgen_dataset_size=100,loadgen_buffer_size=8,sut_name=eb6-kilt-qaic , get ranging_entry , get experiment_end_timestamp  
2023.10.19T11:29:38  
maria@eb6 ~/work_collection/axs2mlperf/base_loadgen_program (master *=)$ time axs byquery power_loadgen_output,task=image_classification,framework=onnxrt,loadgen_scenario=SingleStream,loadgen_mode=AccuracyOnly,model_name=resnet50,loadgen_dataset_size=100,loadgen_buffer_size=8,sut_name=eb6-kilt-qaic , get testing_entry , get experiment_end_timestamp
2023.10.19T11:30:02
maria-18-git commented 1 year ago
maria@eb6 ~/work_collection/axs2mlperf/base_loadgen_program (master *=)$ axs byquery loadgen_output,task=image_classification,framework=onnxrt,loadgen_scenario=SingleStream,loadgen_mode=AccuracyOnly,model_name=resnet50,loadgen_dataset_size=200,loadgen_buffer_size=8,sut_name=eb6-kilt-qaic , get experiment_end_timestamp
2023.10.19T14:24:18
maria-18-git commented 1 year ago

Commit: Added experiment_begin_timestamp and experiment_end_timestamphttps://github.com/krai/axs2mlperf/issues/25)

maria-18-git commented 1 year ago

Status: Done.