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

Allow labels to take on integer values represented by the string type. #36

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

raj-sinha
Copy link
Collaborator

Allow labels to take on integer values represented by the string type.

This change allows the input label type to be a string containg an integer, as well as the empty string which is mapped to the unlabeled data value.

This feature is supported and tested only for the CSV data loader.

Summary:

  1. dtype of label column will be str or int.
  2. empty string is a legal value.
  3. empty string will be internally mapped to the unlabeled value.
  4. internally the map is: {'1': 1, '0': 0, '': -1, '-1': -1}.

@raj-sinha raj-sinha force-pushed the test_702443526 branch 2 times, most recently from 5ebbb16 to c775608 Compare December 4, 2024 18:40
This change allows the input label type to be a string containg an integer, as well as the empty string which is mapped to the unlabeled data value.

This feature is supported and tested only for the CSV data loader.

Summary:

1. dtype of label column will be str or int.
2. empty string is a legal value.
3. empty string will be internally mapped to the unlabeled value.
4. internally the map is: {'1': 1, '0': 0, '': -1, '-1': -1}.

PiperOrigin-RevId: 702784656
@copybara-service copybara-service bot merged commit e3ec5e3 into main Dec 4, 2024
@copybara-service copybara-service bot deleted the test_702443526 branch December 4, 2024 18:56
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

Successfully merging this pull request may close these issues.

1 participant