Skip to content

Commit

Permalink
Merge branch 'main' into prediction_regex_matching
Browse files Browse the repository at this point in the history
  • Loading branch information
elronbandel committed May 5, 2024
2 parents 939f803 + 6cade91 commit f9ac6d9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/unitxt/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def prepare(self):
self.augmentor.set_task_input_fields(self.card.task.augmentable_inputs)
self.processing.steps.append(self.augmentor)

if self.num_demos > 0:
if self.demos_pool_size is not None:
self.processing.steps.append(
CreateDemosPool(
from_split=self.demos_taken_from,
Expand All @@ -234,6 +234,8 @@ def prepare(self):
remove_targets_from_source_split=self.demos_removed_from_data,
)
)

if self.num_demos > 0:
if self.sampler is None:
if self.card.sampler is None:
raise ValueError(
Expand Down
1 change: 0 additions & 1 deletion utils/hf/prepare_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@
delete_patterns="*.py", # delete any unused python files
repo_id="unitxt/data",
repo_type="dataset",
run_as_future=True,
)
1 change: 0 additions & 1 deletion utils/hf/prepare_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@
delete_patterns="*.py", # delete any unused python files
repo_id="unitxt/metric",
repo_type="space",
run_as_future=True,
)

0 comments on commit f9ac6d9

Please sign in to comment.