Refactor Curriculum Attributes (#335)

* remove min_value from AttributeDefinition
* remove type from AttributeDefinition
* Add CurriculumContext
* add ensure_interval option for RangeAttributes
* docs: Add legend explaining curriculum indicators in dataset gallery
* update GALLERY.md
This commit is contained in:
Andreas Köpf 2025-03-16 15:40:28 +01:00 committed by GitHub
parent 4e7d9296ee
commit d2c895f1d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
101 changed files with 286 additions and 677 deletions

View file

@ -10,7 +10,7 @@ from dataclasses import dataclass
from random import Random
from typing import Any, Optional
from ..coaching import AttributeType, BaseCurriculum, RangeAttributeDefinition
from ..coaching import BaseCurriculum, RangeAttributeDefinition
from ..factory import ProceduralDataset, register_dataset
QUESTION_TEMPLATE = """Given a string, partition it such that every substring is a palindrome.
@ -156,20 +156,14 @@ class PalindromePartitioningCurriculum(BaseCurriculum):
RangeAttributeDefinition(
name="string_len",
levels=[10, 100, 500, 1000],
default_level=0,
description="Length of the string",
attr_type=AttributeType.APPEND,
min_value=1,
lower_field_name="min_string_len",
upper_field_name="max_string_len",
),
RangeAttributeDefinition(
name="substring_palindrome_len",
levels=[5, 10, 50, 100],
default_level=0,
description="Length of the substring palindrome",
attr_type=AttributeType.APPEND,
min_value=1,
lower_field_name="min_substring_palindrome_len",
upper_field_name="max_substring_palindrome_len",
),