-
Notifications
You must be signed in to change notification settings - Fork 52
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 some bugs in inference engine tests #1682
Merged
+199
−225
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
1ddb3bb
Fix some bugs in inference engine tests
elronbandel ecb1391
Fix some bugs in inference engine tests
elronbandel 4ce63b8
Fix bug in name conversion in rits
elronbandel 5e15eef
Add engine id
elronbandel 9900113
Merge branch 'main' into fix-inference-tests
elronbandel 8b91761
fix
elronbandel d7d9fb6
fix
elronbandel 91fad1f
Merge remote-tracking branch 'origin/main' into fix-inference-tests
elronbandel 4f17a6c
Use greedy decoding and remove redundant cache
elronbandel 125ad9c
Merge branch 'main' into fix-inference-tests
elronbandel 5cbfa17
Fix hf-auto model test
elronbandel d063913
Touch up watsonx tests
elronbandel e8a9f06
Fix inference tests.
eladven 69824ef
Merge remote-tracking branch 'origin/main' into fix-inference-tests
elronbandel f3cf190
Fix setting of data classification policy
elronbandel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,8 +67,7 @@ def load_chat_source(chat_str): | |
) | ||
return chat | ||
|
||
|
||
def loads_instance(batch): | ||
def loads_batch(batch): | ||
if ( | ||
"source" in batch | ||
and isinstance(batch["source"][0], str) | ||
|
@@ -86,6 +85,24 @@ def loads_instance(batch): | |
batch["task_data"] = [json.loads(d) for d in batch["task_data"]] | ||
return batch | ||
|
||
def loads_instance(instance): | ||
if ( | ||
"source" in instance | ||
and isinstance(instance["source"], str) | ||
and ( | ||
instance["source"].startswith('[{"role":') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems very risky, a minor added space, will cause the code to fail. Need to consider alternatives. |
||
or instance["source"].startswith('[{"content":') | ||
) | ||
): | ||
instance["source"] = load_chat_source(instance["source"]) | ||
if ( | ||
not settings.task_data_as_text | ||
and "task_data" in instance | ||
and isinstance(instance["task_data"], str) | ||
): | ||
instance["task_data"] = json.loads(instance["task_data"]) | ||
return instance | ||
|
||
|
||
class FinalizeDataset(InstanceOperatorValidator): | ||
group_by: List[List[str]] | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why not :
card = TaskCard(loader=LoadFromDictionary(data=data), task=task, data_classification_policy=data_classification_policy) ?