assertactual_list[step]==pytest.approx(expected=expected_list[i],rel=self.margin_loss),f"{self.job_name} : The loss at step {step} should be approximately {expected_list[i]} but it is {actual_list[step]}."
else:
assertactual_list[step]==expected_list[i],f"The value at step {step} should be {expected_list[i]} but it is {actual_list[step]}."
@pytest.mark.xfail
deftest_lm_loss_deterministic(self):
# Expected training loss curve at different global steps.
assertexpected_iteration_timing_avg==pytest.approx(expected=iteration_time_avg,rel=self.margin_time),f"The time per global step must be approximately {expected_iteration_timing_avg} but it is {iteration_time_avg}."