Fixed - The previous for fixing hashing of objects defined in the `__main__` module was not working This should now be fixed.
0.12.1
Changed - The `safe_run` method did unintentionally double-wrap the run method, if it already had a `make_action_safe` decorator. This is now fixed.
Fixed - Under certain conditions hashing of an object defined in the `__main__` module failed. This release implements a workaround for this issue, that should hopefully resolve most cases.
0.12.0
Added
- Added the concept of the `self_optimize_with_info` method that can be implemented instead or in addition to the `self_optimize` method. This method should be used when an optimize method requires to return/output additional information besides the main result and is supported by the `Optimize` wrapper. (https://github.com/mad-lab-fau/tpcp/pull/49) - Added a new method called `__clone_param__` that gives a class control over how params are cloned. This can be helpful, if for some reason objects don't behave well with deepcopy. - Added a new method called `__repr_parameters__` that gives a class control over how params are represented. This can be used to customize the representation of individual parameters in the `__repr__` method. - Add proper repr for `CloneFactory`
0.11.0
Added
- Support for Optuna >3.0 - Example on how to use `attrs` and `dataclass` with tpcp - Added versions for `Dataset` and `CustomOptunaOptimize` that work with dataclasses and attrs. - Added first class support for composite objects (e.g. objects that need a list of other objects as parameters). This is basically sklearn pipelines with fewer restrictions (https://github.com/mad-lab-fau/tpcp/pull/48).
Changed
- `CustomOptunaOptimize` now expects a callable to define the study, instead of taking a study object itself. This ensures that the study objects can be independent when the class is called as part of `cross_validate`. - Parameters are only validated when `get_params` is called. This reduces the reliance on `__init_subclass__` and that we correctly wrap the init. This makes it possible to easier support `attrs` and `dataclass`
0.10.0
Changed
- Reworked once again when and how annotations for tpcp classes are processed. Processing is now delayed until you are actually using the annotations (i.e. as part of the "safe wrappers"). The only user facing change is that the chance of running into edge cases is lower and that `__field_annotations__` is now only available on class instances and not the class itself anymore.
0.9.1
Fixed - Classes without init can now pass the tpcp checks
Added - You can nest parameter annotations into `ClassVar` and they will still be processed. This is helpful when using dataclasses and annotating nested parameter values.