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

Add add_split method inside CsvProcessing and corresponding tests #37

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

suzannejin
Copy link
Contributor

No description provided.

"""
if ('split' in self.categories) and (not force):
raise ValueError(f"The category split is already present in the csv file. If you want to still use this function, set force=True")

Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed that csv already present should raise a warning and not an error, I will merge as is but this should be modified in the future.

def __init__(self, experiment: Any, csv_path: str) -> None:
super().__init__(experiment, csv_path)
self.data = self.load_csv()


def add_split(self, split_method: str, split: list, seed: float = None, force=False) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Name doesnt feel too intuitive for me

@mathysgrapotte mathysgrapotte merged commit 359429c into main Mar 18, 2024
1 check passed
@suzannejin suzannejin deleted the split branch April 11, 2024 15:27
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.

2 participants