-
Notifications
You must be signed in to change notification settings - Fork 34
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
Refacto/Updated format of Harness #706
Conversation
…Labs/langtest into refacto/model-as-a-dict
…Labs/langtest into refacto/model-as-a-dict
…Labs/langtest into refacto/model-as-a-dict
task (str): Task to be evaluated. | ||
""" | ||
self._file_path = file_path | ||
self._file_path = file_path.get("data_source") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if data_source is not provided, then it should raise an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make it changes, @Prikshit7766 @RakshitKhajuria
langtest/langtest.py
Outdated
@@ -1038,11 +1072,11 @@ def edit_testcases(self, output_path: str, **kwargs): | |||
temp_df = temp_df[temp_df["category"].isin(["robustness", "bias"])] | |||
temp_df.to_csv(output_path, index=False) | |||
|
|||
def import_edited_testcases(self, input_path: str, **kwargs): | |||
def import_edited_testcases(self, input_path: dict, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user can provide only the str of the input path. and we can convert it into the required dict format within the function.
Description
Updated format of Harness
one model
multiple model
where
model (list | dict, optional): Specifies the model to be evaluated.
If provided as a list, each element should be a dictionary with 'model' and 'hub' keys.
If provided as a dictionary, it must contain 'model' and 'hub' keys when specifying a path.
data (dict, optional): The data to be used for evaluation.
The data parameter should be updated to accept a dictionary, providing more flexibility and options for data sources. The dictionary should include the following keys:
➤ Fixes #581
Type of change
Please delete options that are not relevant.
Usage
Checklist:
pydantic
for typing when/where necessary.