Skip to content

Commit

Permalink
Fix failing MF submission test
Browse files Browse the repository at this point in the history
  • Loading branch information
William Qi committed Mar 25, 2023
1 parent 8b0449a commit c9cd2e3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def test_challenge_submission_serialization(tmpdir: Path, test_submission_dict:
deserialized_submission = ChallengeSubmission.from_parquet(submission_file_path)

# Check that deserialized data matches original data exactly
for scenario_id, scenario_predictions in submission.predictions.items():
for track_id, (expected_trajectories, expected_probabilities) in scenario_predictions.items():
deserialized_predictions = deserialized_submission.predictions[scenario_id][track_id]
(deserialized_trajectories, deserialized_probabilities) = deserialized_predictions
for scenario_id, (expected_probabilities, scenario_trajectories) in submission.predictions.items():
for track_id, expected_trajectories in scenario_trajectories.items():
deserialized_probabilities = deserialized_submission.predictions[scenario_id][0]
deserialized_trajectories = deserialized_submission.predictions[scenario_id][1][track_id]
assert np.array_equal(deserialized_trajectories, expected_trajectories)
assert np.array_equal(deserialized_probabilities, expected_probabilities)

0 comments on commit c9cd2e3

Please sign in to comment.