`OptimizationConfig.seed` is `PositiveInt` — `seed=0` is rejected while `Pipeline(seed=0)` accepts it
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend-api-design
Research direction
Read src/autointent/_optimization_config.py at line 52 and compare its seed type with the seed parameters in src/autointent/_pipeline/_pipeline.py at lines 54, 111, and 124-127. Verify the public constructors accept seed=0 consistently, including OptimizationConfig, Pipeline.from_preset, and Pipeline.from_optimization_config.
Written by the indexing model from the issue text.
Description
What happens
OptimizationConfig.seed is declared PositiveInt (_optimization_config.py:52), so seed=0 — a perfectly normal seed, and the first value of any seed grid — is rejected:
>>> from autointent import OptimizationConfig
>>> OptimizationConfig(seed=0, search_space=[])
ValidationError: 1 validation error for OptimizationConfig
seed
Input should be greater than 0 [type=greater_than, input_value=0, input_type=int]
It is inconsistent with the rest of the API: Pipeline(seed=...) and Pipeline.from_search_space(seed=...) take int | None (_pipeline.py:54, :111) and accept 0, while Pipeline.from_preset(name, seed=0) and Pipeline.from_optimization_config fail because they build an OptimizationConfig (:124-127).
Proposed
NonNegativeInt (or plain int, matching Pipeline). Darinochka/AutoIntent-experiments#43 works around it by building the pipeline with the default seed and setting pipeline._seed = 0 afterwards.
Follow-up from #350.
- Dominant language
- Python
- Stars
- 54
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deeppavlov/AutoIntent
-
Extract `BaseAPIDescriptionScorer` shared by `LLMDescriptionScorer` and `TypeSafeDescriptionScorer` Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
deeppavlov/AutoIntent#357 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 52/100
deeppavlov/AutoIntent#356 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
deeppavlov/AutoIntent#355 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 58/100
deeppavlov/AutoIntent#354 ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
deeppavlov/AutoIntent#353 ·
All issues in deeppavlov/AutoIntent
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100