Skip to content

Commit

Permalink
Sort DF by probability when loading from parquet
Browse files Browse the repository at this point in the history
  • Loading branch information
wqi committed Apr 18, 2022
1 parent ba36cd6 commit 84a56e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/av2/datasets/motion_forecasting/eval/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def from_parquet(cls, submission_file_path: Path) -> ChallengeSubmission:
"""
# Load submission data and sort rows by descending probability
submission_df = pd.read_parquet(submission_file_path)
submission_df.sort_values(by="probability", inplace=True, ascending=False)

# From serialized data, build scenario-track mapping for predictions
submission_dict: Dict[str, ScenarioPredictions] = defaultdict(lambda: defaultdict(dict)) # type: ignore
Expand Down

0 comments on commit 84a56e7

Please sign in to comment.