mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-30 17:40:45 +00:00
fix(curriculum): Make boundaries in curriculum more sensible (#407)
* init * fix tests * unify codeio * filtered for libraries not present in reasoning-gym * fix more bounds * puzzle24 * knight swap curriculum * fix number sorting * fix attributes * add validation of config in creation of dataset * dry run for instantiating and validating the datasets * remove unused imports * fix curriculum tests to reference newly updated attribute names
This commit is contained in:
parent
7853263650
commit
dced3bfc45
132 changed files with 1226 additions and 347 deletions
|
|
@ -78,6 +78,7 @@ class LegCountingConfig:
|
|||
"""Validate configuration parameters"""
|
||||
assert self.min_animals > 0, "min_animals must be positive"
|
||||
assert self.max_animals >= self.min_animals, "max_animals must be >= min_animals"
|
||||
assert self.max_animals <= len(ANIMALS), "max_animals must be <= number of available animals" # 37
|
||||
assert self.min_instances > 0, "min_instances must be positive"
|
||||
assert self.max_instances >= self.min_instances, "max_instances must be >= min_instances"
|
||||
|
||||
|
|
@ -141,7 +142,7 @@ class LegCountingCurriculum(BaseCurriculum):
|
|||
self._define_attributes(
|
||||
RangeAttributeDefinition(
|
||||
name="num_animals",
|
||||
levels=list(range(1, 20)),
|
||||
levels=list(range(1, 37)),
|
||||
description="Number of animals in question",
|
||||
lower_field_name="min_animals",
|
||||
upper_field_name="max_animals",
|
||||
|
|
@ -152,6 +153,7 @@ class LegCountingCurriculum(BaseCurriculum):
|
|||
description="Number of instances of each animal",
|
||||
lower_field_name="min_instances",
|
||||
upper_field_name="max_instances",
|
||||
ensure_interval=True,
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue