Setting `early_stopping_timeout` to `None` is not handled correctly
- Dominant language
- Python
- Stars
- 73
- Forks
- 11
- Avg merge
- 8h 51m
- Merged PRs (30d)
- 4
Description
While working with FEDOT, I discovered that the `early_stopping_timeout` parameter cannot be set to `None`. Attempting to do so results in the following errors:
```
> lambda: self.generations.stagnation_time_duration >= max_stagnation_time,
'Optimisation finished: Early stopping timeout criteria was satisfied'
)
E TypeError: '>=' not supported between instances of 'float' and 'datetime.timedelta'
../../golem/core/optimisers/populational_optimizer.py:75: TypeError
```
when `timeout` parameter is set and
```
> lambda: self.generations.stagnation_time_duration >= max_stagnation_time,
'Optimisation finished: Early stopping timeout criteria was satisfied'
)
E TypeError: '>=' not supported between instances of 'float' and 'NoneType'
../../golem/core/optimisers/populational_optimizer.py:75: TypeError
```
when both `early_stopping_timeout` and `timeout` parameters are `None`
## Current Workaround:
Currently, to disable this parameter, one can use `early_stopping_timeout=np.inf` instead.
## Expected Behavior:
Setting `early_stopping_timeout=None` should:
- Be accepted as a valid parameter value
- Effectively disable the early stopping timeout functionality
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.