Skip to content

Commit

Permalink
bump version + update dianna
Browse files Browse the repository at this point in the history
The mask generation util function in DIANNA that we use changed names since 1.4.0, so we bump the requirement for this.
  • Loading branch information
egpbos committed Jul 30, 2024
1 parent e3291c0 commit 4bc6b9a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:

date-released: 2023-10-19
doi: 10.5281/zenodo.10018768.
version: "0.2.0"
version: "0.3.0"
repository-code: "[email protected]:dianna-ai/distance_explainer"
keywords:
- XAI
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# built documents.
#
# The short X.Y version.
version = "0.2.0"
version = "0.3.0"
# The full version, including alpha/beta/rc tags.
release = version

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ name = distance_explainer
project_urls =
Bug Tracker = https://github.com/dianna-ai/distance_explainer/issues
url = https://github.com/dianna-ai/distance_explainer
version = 0.2.0
version = 0.3.0

[options]
python_requires = >=3.9
install_requires =
dianna>=1.2
dianna>=1.4
numpy
pytest
tqdm
Expand Down
6 changes: 3 additions & 3 deletions src/distance_explainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logging
import dianna.utils
import numpy as np
from dianna.utils.maskers import generate_masks_for_images
from dianna.utils.maskers import generate_interpolated_float_masks_for_image
from sklearn.metrics import pairwise_distances
from tqdm import tqdm
import numpy.typing
Expand All @@ -12,7 +12,7 @@

__author__ = "Christiaan Meijer"
__email__ = "[email protected]"
__version__ = "0.2.0"
__version__ = "0.3.0"


class DistanceExplainer:
Expand Down Expand Up @@ -72,7 +72,7 @@ def explain_image_distance(self, model_or_function, input_data, embedded_referen
img_shape = input_data.shape[1:3]
# Expose masks for to make user inspection possible
if masks is None:
self.masks = generate_masks_for_images(img_shape, self.n_masks, active_p_keep, self.feature_res)
self.masks = generate_interpolated_float_masks_for_image(img_shape, active_p_keep, self.n_masks, self.feature_res)
else:
self.masks = masks
if self.masks.shape[0] != self.n_masks:
Expand Down

0 comments on commit 4bc6b9a

Please sign in to comment.