Skip to content

Commit 8d4f588

Browse files
authored
Merge pull request #76 from JuliaTrustworthyAI/74-updates-for-thesis
removed redundant deps
2 parents 3a3740d + 0759d58 commit 8d4f588

7 files changed

Lines changed: 26 additions & 30 deletions

File tree

.github/workflows/CI.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
version:
21-
- '1.7'
22-
- '1.8'
23-
- '~1.9.0-0'
24-
- 'nightly'
21+
- '1.9'
2522
os:
2623
- ubuntu-latest
2724
arch:
@@ -48,7 +45,7 @@ jobs:
4845
- uses: actions/checkout@v2
4946
- uses: julia-actions/setup-julia@v1
5047
with:
51-
version: '1'
48+
version: '1.9'
5249
- uses: julia-actions/julia-buildpkg@v1
5350
- uses: julia-actions/julia-docdeploy@v1
5451
env:

Project.toml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
11
name = "AlgorithmicRecourseDynamics"
22
uuid = "3d1ede72-abb8-4340-bf8e-2ae06849b5ec"
33
authors = ["Patrick Altmeyer"]
4-
version = "0.1.3"
4+
version = "0.1.4"
55

66
[deps]
77
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
88
CounterfactualExplanations = "2f13d31b-18db-44c1-bc43-ebaf2cff0be0"
99
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
1010
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
1111
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
12-
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
1312
KernelFunctions = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
1413
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
1514
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1615
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
1716
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
1817
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
1918
Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a"
20-
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
2119
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
22-
RCall = "6f49c342-dc21-5d91-9882-a32aef131414"
2320
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2421
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
2522
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2623
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
2724

2825
[compat]
2926
CSV = "0.10"
30-
CounterfactualExplanations = "0.1"
27+
CounterfactualExplanations = "=0.1.6"
3128
DataFrames = "1"
3229
Distances = "0.10"
33-
Flux = "0.13"
34-
Images = "0.25"
30+
Flux = "0.13 - 0.14"
3531
KernelFunctions = "0.10"
3632
MLJBase = "0.21.3"
37-
MLUtils = "0.3.1, 0.4"
33+
MLUtils = "0.3.1 - 0.4"
3834
Parameters = "0.12"
39-
Plots = "1.37.2"
4035
ProgressMeter = "1"
41-
RCall = "0.13.14"
4236
StatsBase = "0.33"
4337
julia = "1.7, 1.8, 1.9"
4438

README.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ crossref:
1212
fig-prefix: Figure
1313
tbl-prefix: Table
1414
bibliography: bib.bib
15-
jupyter: julia-1.8
15+
engine: julia
16+
julia:
17+
exeflags: ["+1.9"]
1618
---
1719

1820
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliatrustworthyai.github.io/AlgorithmicRecourseDynamics.jl/stable)
1921
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliatrustworthyai.github.io/AlgorithmicRecourseDynamics.jl/dev)
2022
[![Build Status](https://github.com/juliatrustworthyai/AlgorithmicRecourseDynamics.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/juliatrustworthyai/AlgorithmicRecourseDynamics.jl/actions/workflows/CI.yml?query=branch%3Amain)
2123
[![Coverage](https://codecov.io/gh/juliatrustworthyai/AlgorithmicRecourseDynamics.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/juliatrustworthyai/AlgorithmicRecourseDynamics.jl)
2224
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)
23-
[![ColPrac: Contributor’s Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet.png)](https://github.com/SciML/ColPrac)
24-
[![Twitter Badge](https://img.shields.io/twitter/url/https/twitter.com/paltmey.svg?style=social&label=Follow%20%40paltmey)](https://twitter.com/paltmey)
2525

2626
# AlgorithmicRecourseDynamics
2727

28-
{{< include docs/src/_intro.qmd >}}
28+
{{< include docs/src/_intro.qmd >}}

_quarto.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ execute:
1414
echo: true
1515
output: false
1616

17-
jupyter: julia-1.8
18-
19-
20-
17+
engines: ['julia']
18+
julia:
19+
exeflags: ["+1.9"]

src/experiments/functions.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,15 @@ function update_experiment!(experiment::Experiment, recourse_system::RecourseSys
172172
indices_ = rand(1:experiment.num_counterfactuals, length(results)) # randomly draw from generated counterfactuals
173173
X′ = reduce(hcat, @.(selectdim(counterfactual(results), 3, indices_)))
174174
y′ = reduce(hcat, @.(selectdim(counterfactual_label(results), 3, indices_)))
175+
y′ = [y[1] for y in y′]
175176

176-
# If for any counterfactuals the returned label is NaN, this is considered as invalid and the current label is not updated:
177-
valid_ces = vec(.!(isnan.(y′)))
178-
chosen_individuals = chosen_individuals[valid_ces]
177+
# If for any counterfactuals the returned label is NaN, this is considered as invalid and the current label is not updated:
178+
valid_ces = vec(.!(isnan.(y′)))
179+
chosen_individuals = chosen_individuals[valid_ces]
179180

180-
# Update data:
181-
X[:, chosen_individuals] = X′[:, valid_ces]
182-
y[:, chosen_individuals] = y′[:, valid_ces]
181+
# Update data:
182+
X[:, chosen_individuals] = X′[:, valid_ces]
183+
y[:, chosen_individuals] = y′[:, valid_ces]
183184

184185
# Generative model:
185186
gen_mod = deepcopy(counterfactual_data.generative_model)

test/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
66
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
77
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
88
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
9+
10+
[compat]
11+
CounterfactualExplanations = "=0.1.6"
12+
Flux = "0.13 - 0.14"
13+

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ using Test
2626
generators = Dict(:wachter => generator)
2727
experiment = set_up_experiment(data_train, data_test, models, generators)
2828

29-
run!(experiment)
29+
run!(experiment, n_folds=1, n_rounds=5)
3030

3131
end

0 commit comments

Comments
 (0)