-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Avoid new `Explanation` field from PR #5 being breaking * Undo separation between `heatmap` and `textheatmap` from PR #4
- Loading branch information
Showing
8 changed files
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "XAIBase" | ||
uuid = "9b48221d-a747-4c1b-9860-46a1d8ba24a7" | ||
authors = ["Adrian Hill <[email protected]>"] | ||
version = "2.0.0-DEV" | ||
version = "1.1.0-DEV" | ||
|
||
[deps] | ||
TextHeatmaps = "2dd6718a-6083-4824-b9f7-90e4a57f72d2" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function Explanation(val, output, output_selection, analyzer::Symbol) | ||
@warn "Creating an Explanation without a heatmap style is being deprecated. Defaulting to `heatmap=:attribution`." | ||
return Explanation(val, output, output_selection, analyzer, :attribution, nothing) | ||
end | ||
function Explanation( | ||
val, output, output_selection, analyzer::Symbol, extras::Union{Nothing,NamedTuple} | ||
) | ||
@warn "Creating an Explanation without a heatmap style is being deprecated. Defaulting to `heatmap=:attribution`." | ||
return Explanation(val, output, output_selection, analyzer, :attribution, extras) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Test deprecation warnings | ||
shape = (2, 2, 3, 1) | ||
val = output = reshape(collect(Float32, 1:prod(shape)), shape) | ||
neuron_selection = [CartesianIndex(1, 2)] # irrelevant | ||
@test_logs (:warn,) expl = Explanation(val, output, [neuron_selection], :LRP) | ||
@test_logs (:warn,) expl = Explanation(val, output, [neuron_selection], :LRP, nothing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters