Organize benchmark logs by date/branch/commit and propagate run metadata to Feishu#173
Open
chen2021673 wants to merge 1 commit into
Open
Organize benchmark logs by date/branch/commit and propagate run metadata to Feishu#173chen2021673 wants to merge 1 commit into
chen2021673 wants to merge 1 commit into
Conversation
…ata to Feishu Restructure run_models_and_profile.bash to write logs under <date>/<branch>_<commit>/ and emit a run_metadata.log plus per-log metadata headers (branch, commit, start time). write_to_feishu_sheet.py now reads this metadata so each sheet row reflects the actual run instead of the current git state, and accepts --log-dir/--profile-log-dir. compare_utils.py skips the new run_metadata.log when collecting logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Benchmark 日志此前平铺在
logs/、profile_logs/下,且写入飞书表格时用的是「当前」git 分支和 commit,导致补传旧日志或并行多次运行时元信息错乱。本 PR 让每次运行的日志按<日期>/<分支>_<commit>/归档,并把真实的运行元信息(分支、commit、启动时间)记录进日志,飞书脚本据此回填,不再依赖当前 git 状态。Changes
scripts/run_models_and_profile.bashRUN_STARTED_AT/RUN_ID/ git 分支与 commit,并对分支名做文件名安全处理。LOG_DIR/PROFILE_LOG_DIR重定向到<父目录>/<日期>/<分支>_<commit短>/下,避免不同运行互相覆盖。run_metadata.log汇总本次运行信息;每个训练日志头部追加[RUN_METADATA]/[RUN_STARTED_AT]/[GIT_BRANCH]/[GIT_COMMIT]等行。scripts/write_to_feishu_sheet.pyparse_metadata_lines/load_run_metadata,从训练日志及其引用的run_metadata.log解析元信息。get_run_date/get_run_branch/get_run_commit_id),旧日志无元信息时回退到当前 git。main新增--log-dir/--profile-log-dir参数,并透传到discover_testcases与get_model_data。scripts/compare_utils.pycollect_log_files跳过新增的run_metadata.log,避免被当作训练日志参与对比。Tests
本地日志路径:

写入命令: