chore: import upstream snapshot with attribution
Lint test / lint (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:58 +08:00
commit a203934033
1368 changed files with 175001 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# Copyright (c) ModelScope Contributors. All rights reserved.
def rewrite_logs(logs):
new_logs = {}
for k, v in logs.items():
if isinstance(v, str):
continue
k = k.replace('/', '_')
if k.startswith('eval_'):
k = k[len('eval_'):]
k = f'eval/{k}'
elif k.startswith('test_'):
k = k[len('test_'):]
k = f'test/{k}'
else:
k = f'train/{k}'
new_logs[k] = v
return new_logs