Skip to content

Commit 3a33fda

Browse files
committed
Make objective classes slotted
1 parent 33b305d commit 3a33fda

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88
### Fixed
9-
- Parameter classes are now slotted due to `cached_property` attrs support
9+
- Parameter and objective classes are now slotted due to `cached_property` attrs support
1010

1111
## [0.10.0] - 2024-08-02
1212
### Breaking Changes

baybe/objectives/base.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
from baybe.serialization.mixin import SerialMixin
1515
from baybe.targets.base import Target
1616

17-
# TODO: Reactive slots in all classes once cached_property is supported:
18-
# https://github.com/python-attrs/attrs/issues/164
1917

20-
21-
@define(frozen=True, slots=False)
18+
@define(frozen=True)
2219
class Objective(ABC, SerialMixin):
2320
"""Abstract base class for all objectives."""
2421

baybe/objectives/desirability.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def scalarize(
6161
return func(values, weights=weights)
6262

6363

64-
@define(frozen=True, slots=False)
64+
@define(frozen=True)
6565
class DesirabilityObjective(Objective):
6666
"""An objective scalarizing multiple targets using desirability values."""
6767

0 commit comments

Comments
 (0)