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

ENH: ability to add datum metadata after datum creation #770

Open
1 of 3 tasks
MattMcClainStrive opened this issue Sep 30, 2024 · 0 comments
Open
1 of 3 tasks

ENH: ability to add datum metadata after datum creation #770

MattMcClainStrive opened this issue Sep 30, 2024 · 0 comments

Comments

@MattMcClainStrive
Copy link

Feature Type

  • Adding new functionality to valor

  • Changing existing functionality in valor

  • Removing existing functionality in valor

Problem Description

I would like to be able to add metadata to datums after the datums have been created. Before I see some examples of errors a model makes on my data, I may not know the types of metadata that will be relevant and I may not have the time to create all possible types of metadata.

Feature Description

Add new client functions that adds new metadata to a datum (or list of datums) in a dataset and finalizes the new metadata key.

def add_datum_metadata(dataset, datums, key, value):
"""
Parameters:
dataset: the Valor Dataset containing the datums
datums: List of Datums or datum_ids to add the metadata to
key: the metadata key to add
value: the metadata value to add

Adds metadata to datum(s) in a dataset. The metadata key must be new to the dataset to ensure that existing evaluations remain accurate. When metadata for all datums has been added, call finalize_dataset_metadata(dataset, key), which will prevent new metadata with that key from being added and allow filtering on the metadata key.
"""

def finalize_dataset_metadata(dataset, key):
"""
Parameters:
dataset: the Valor Dataset
key: the metadata key to finalize

Allows filtering based on the metadata key in this dataset and prevents new metadata with this key from being added.
"""

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant