1919810
This commit is contained in:
@@ -424,6 +424,23 @@ def test_describe_process_progress_and_eta():
|
||||
assert ended["remaining_s"] is None
|
||||
|
||||
|
||||
def test_describe_process_curriculum_transfer_uses_delta_steps():
|
||||
"""--init 课程迁移:计数器从上一阶段继续,进度/ETA 必须按本次增量算。"""
|
||||
snapshot = {
|
||||
"status": "running", "elapsed_s": 10.0,
|
||||
"config": {"timesteps": 8000, "max_wall_s": 3600.0},
|
||||
"metrics": [{"timesteps": 110000, "start_timesteps": 109776, "fps": 50.0},
|
||||
{"timesteps": 111776, "start_timesteps": 109776, "fps": 50.0}],
|
||||
"convergence": {}, "log_total": 2, "metric_total": 2,
|
||||
}
|
||||
process = td.describe_process(snapshot)
|
||||
assert process["done_steps"] == 111776 # 绝对计数照实显示
|
||||
assert process["start_steps"] == 109776
|
||||
assert process["trained_steps"] == 2000 # 本次增量
|
||||
assert process["percent"] == 25.0 # 而不是被夹到 100%
|
||||
assert process["remaining_s"] == pytest.approx(120.0, rel=1e-6)
|
||||
|
||||
|
||||
def test_demo_snapshot_contract():
|
||||
for scenario in demo.DEMO_SCENARIOS:
|
||||
snapshot = demo.demo_snapshot(scenario=scenario)
|
||||
|
||||
Reference in New Issue
Block a user