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 errors with nested subfields #776

Merged
merged 9 commits into from
Dec 2, 2024
Merged

Fix errors with nested subfields #776

merged 9 commits into from
Dec 2, 2024

Conversation

ccl-core
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Nov 29, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@ccl-core
Copy link
Contributor Author

Tested with:

python load.py --jsonld   /usr/local/google/home/stanzelc/croissant/datasets/1.0/huggingface-lmms-eval-lite/metadata.json --record_set gqa  --debug --num_records 3 

@ccl-core ccl-core marked this pull request as ready for review November 29, 2024 14:56
@ccl-core ccl-core requested a review from a team as a code owner November 29, 2024 14:56
@ccl-core
Copy link
Contributor Author

TODO: add tests

Copy link
Contributor

@marcenacp marcenacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the thorough bug analysis!

fields = self._fields()
fields = self._get_fields(self.node.fields)
if not fields:
raise ValueError(f"RecordSet {self.node.uuid} has no fields!")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this wanted? We probably want to return an empty dict?

for v in value
]
except TypeError:
value = value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of dropping the _cast_value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we want to do that for all cases?

Copy link
Contributor

@marcenacp marcenacp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ccl-core ccl-core merged commit f533cee into main Dec 2, 2024
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants