Skip to content

Commit 646dd0a

Browse files
committed
Fixed pyright issue with seeding config space.
1 parent ec4bed4 commit 646dd0a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "hypershap"
3-
version = "0.0.2"
3+
version = "0.0.4"
44
description = "HyperSHAP is a post-hoc explanation method for hyperparameter optimization."
55
authors = [{ name = "Marcel Wever", email = "m.wever@ai.uni-hannover.de" }]
66
readme = "README.md"

src/hypershap/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ def __init__(
9898
"""
9999
super().__init__(explanation_task, mode=mode)
100100
cs = deepcopy(explanation_task.config_space)
101-
cs.seed(seed)
101+
if seed is not None:
102+
cs.seed(seed)
102103
sampled_configurations = cs.sample_configuration(size=n_samples)
103104
self.random_sample = np.array([config.get_array() for config in sampled_configurations])
104105

0 commit comments

Comments
 (0)