Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #4720: Handle empty events array in trace dataset loading #6111

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jlonge4
Copy link
Contributor

@jlonge4 jlonge4 commented Jan 17, 2025

This PR addresses the issue described in BUG attempting to load parquet tracing file throws ValueError #4720.

The Type of row.get("events") is numpy.ndarray when reading in a trace dataset that was previously saved.

The changes made ensure that the events field in the trace dataset is handled correctly, preventing errors related to ambiguous truth values when processing empty arrays.

Key Changes:

  • Type Handling: The events field is now explicitly checked for its type.
  • If it is a NumPy array, it is converted to a standard Python list using .tolist().

This ensures consistent behavior and avoids TypeError when evaluating empty lists.

@jlonge4 jlonge4 changed the title Fixes #4720: Handle empty events array in trace dataset loading fix #4720: Handle empty events array in trace dataset loading Jan 17, 2025
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Status: 📘 Todo
Development

Successfully merging this pull request may close these issues.

1 participant