Skip to content

Commit

Permalink
Merge branch 'main' into sartsa-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahpslewis authored May 8, 2024
2 parents e78aa46 + b23dd43 commit 4a3be9c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM julia:1.10

RUN apt-get update && apt-get install -y git
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"customizations": {
"vscode": {
"extensions": [
"julialang.language-julia",
"ms-azuretools.vscode-docker"
]
}
},
"runArgs": [
"--privileged"
],
"dockerFile": "Dockerfile",
"updateContentCommand": "julia -e 'using Pkg; Pkg.develop(path=\".\");'"
}
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- main
tags: '*'
pull_request:
workflow_dispatch:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
Expand Down
3 changes: 2 additions & 1 deletion test/episodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ using Test
@test eb.sampleable_inds == [1,1,1,1,1,0,0]
@test eb[:action][6] == 6
@test eb[:next_action][5] == 6
@test eb[6][:reward] == 0 broken = true #6 is not a valid index and cannot be indexed because a PartialNamedTuple is used
@test eb[:reward][6] == 0 #6 is not a valid index, the reward there is dummy, filled as zero
@test_throws BoundsError eb[6] #6 is not a valid index, the reward there is dummy, filled as zero
ep2_len = 0
for (j,i) = enumerate(8:11)
ep2_len += 1
Expand Down
4 changes: 3 additions & 1 deletion test/traces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ end
@test t1[:reward][1] == 5

@test size(Base.getindex(t1, :reward)) == (1,)
@test size(Base.getindex(t1, 1).state) == (2,3)

push!(t1, Val(:state), ones(2,3))

@test t1[:state][1] == ones(2,3)

t2 = Traces(; a=[2, 3], b=[false, true])
push!(t2, Val(:a), 5)
Expand Down

0 comments on commit 4a3be9c

Please sign in to comment.