Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, config=None):
mock=self.config.mock,
)

if sum(self.config.neuron.task_p) != 1:
if abs(1-sum(self.config.neuron.task_p)) > 0.001:
raise ValueError("Task probabilities do not sum to 1.")

# Filter out tasks with 0 probability
Expand Down
4 changes: 2 additions & 2 deletions prompting/task_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
mock_task, mock_dataset = MockTask.name, [MockDataset.name]
summarization_task, summarization_dataset = SummarizationTask.name, [WikiDataset.name]
qa_task, qa_dataset = QuestionAnsweringTask.name, [WikiDataset.name]
debugging_task, debugging_dataset = DebuggingTask.name, [HFCodingDataset.name]
#debugging_task, debugging_dataset = DebuggingTask.name, [HFCodingDataset.name]
math_task, math_dataset = MathTask.name, [MathDataset.name]
date_qa_task, date_qa_dataset = DateQuestionAnsweringTask.name, [WikiDateDataset.name]
generic_instruction_task, generic_instruction_dataset = GenericInstructionTask.name, [GenericInstructionDataset.name]
Expand All @@ -14,7 +14,7 @@
mock_task: mock_dataset,
summarization_task: summarization_dataset,
qa_task: qa_dataset,
debugging_task: debugging_dataset,
#debugging_task: debugging_dataset,
math_task: math_dataset,
date_qa_task: date_qa_dataset,
generic_instruction_task: generic_instruction_dataset
Expand Down
2 changes: 1 addition & 1 deletion prompting/tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
QuestionAnsweringTask.name: QuestionAnsweringTask,
DateQuestionAnsweringTask.name: DateQuestionAnsweringTask,
SummarizationTask.name: SummarizationTask,
DebuggingTask.name: DebuggingTask,
#DebuggingTask.name: DebuggingTask,
GenericInstructionTask.name: GenericInstructionTask,
MathTask.name: MathTask,
}
2 changes: 1 addition & 1 deletion prompting/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

DATASETS = {
MockDataset.name: MockDataset,
HFCodingDataset.name: HFCodingDataset,
#HFCodingDataset.name: HFCodingDataset,
WikiDataset.name: WikiDataset,
#StackOverflowDataset.name: StackOverflowDataset,
MathDataset.name: MathDataset,
Expand Down
2 changes: 1 addition & 1 deletion prompting/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def add_validator_args(cls, parser):
type=float,
nargs="+",
help="The probability of sampling each task.",
default=[.2, .2, .2, 0, .2, .2],
default=[1.0 / (len(TASKS)-1)] * (len(TASKS)-1),
)

parser.add_argument(
Expand Down