diff --git a/projects/ExampleMonteCarlo/report/report.jl b/projects/ExampleMonteCarlo/report/report.jl index 6288305..9308794 100644 --- a/projects/ExampleMonteCarlo/report/report.jl +++ b/projects/ExampleMonteCarlo/report/report.jl @@ -7,9 +7,8 @@ using ExampleMonteCarlo: ExampleMonteCarlo using ParamIO: ParamIO const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +vault = DataVault.Vault(CONFIG; run="phase1") rows = ExampleMonteCarlo.summarise(vault) # the same reduction scripts/collect.jl uses @info "reporting over" n = length(rows) diff --git a/projects/ExampleMonteCarlo/scripts/collect.jl b/projects/ExampleMonteCarlo/scripts/collect.jl index 328dc59..c7b7ed7 100644 --- a/projects/ExampleMonteCarlo/scripts/collect.jl +++ b/projects/ExampleMonteCarlo/scripts/collect.jl @@ -8,9 +8,8 @@ using ParamIO: ParamIO using Printf const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +vault = DataVault.Vault(CONFIG; run="phase1") rows = ExampleMonteCarlo.summarise(vault) @printf("\n %-5s %-7s %-11s %-11s %s\n", "L", "kbT", "E/N", "|M|", "Binder") diff --git a/projects/ExampleMonteCarlo/scripts/compute.jl b/projects/ExampleMonteCarlo/scripts/compute.jl index 9a9bce1..5f8e314 100644 --- a/projects/ExampleMonteCarlo/scripts/compute.jl +++ b/projects/ExampleMonteCarlo/scripts/compute.jl @@ -18,11 +18,14 @@ using ParamIO: ParamIO using SweepRunner: SweepRunner const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) spec = ParamIO.load(CONFIG) keys = ParamIO.expand(spec) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +# `outdir` is NOT passed. DataVault resolves it itself — kwarg, then DATAVAULT_OUTDIR, then the +# config's [study] outdir — and a kwarg wins, so reading the environment here and handing the result +# over would silently make the config's own setting unreachable. The config decides where its +# results go; the driver only says which run. +vault = DataVault.Vault(CONFIG; run="phase1") SweepRunner.init_workers!(; mode=:auto) opts = SweepRunner.RunOpts(; stop_flag=get(ENV, "PM_STOP_FLAG", nothing)) diff --git a/projects/ExampleSweep/report/report.jl b/projects/ExampleSweep/report/report.jl index 839178a..c10da56 100644 --- a/projects/ExampleSweep/report/report.jl +++ b/projects/ExampleSweep/report/report.jl @@ -8,9 +8,8 @@ using ExampleSweep: ExampleSweep using ParamIO: ParamIO const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +vault = DataVault.Vault(CONFIG; run="phase1") rows = ExampleSweep.summarise(vault) # the same reduction scripts/collect.jl uses @info "reporting over" n = length(rows) diff --git a/projects/ExampleSweep/scripts/collect.jl b/projects/ExampleSweep/scripts/collect.jl index 34dbdc7..4298124 100644 --- a/projects/ExampleSweep/scripts/collect.jl +++ b/projects/ExampleSweep/scripts/collect.jl @@ -9,9 +9,8 @@ using ParamIO: ParamIO using Printf const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +vault = DataVault.Vault(CONFIG; run="phase1") rows = ExampleSweep.summarise(vault) # the same reduction report/ uses @printf("\n %-8s %-10s %s\n", "a", "dt", "rel_error") diff --git a/projects/ExampleSweep/scripts/compute.jl b/projects/ExampleSweep/scripts/compute.jl index 2e94778..e8dca05 100644 --- a/projects/ExampleSweep/scripts/compute.jl +++ b/projects/ExampleSweep/scripts/compute.jl @@ -25,12 +25,14 @@ using ParamIO: ParamIO using SweepRunner: SweepRunner const CONFIG = get(ARGS, 1, joinpath(@__DIR__, "..", "configs", "smoke.toml")) -# outdir precedence, resolved by DataVault: kwarg > ENV > the config's [study]. -const OUTDIR = get(ENV, "DATAVAULT_OUTDIR", joinpath(@__DIR__, "..", "out")) spec = ParamIO.load(CONFIG) keys = ParamIO.expand(spec) -vault = DataVault.Vault(CONFIG; run="phase1", outdir=OUTDIR) +# `outdir` is NOT passed. DataVault resolves it itself — kwarg, then DATAVAULT_OUTDIR, then the +# config's [study] outdir — and a kwarg wins, so reading the environment here and handing the result +# over would silently make the config's own setting unreachable. The config decides where its +# results go; the driver only says which run. +vault = DataVault.Vault(CONFIG; run="phase1") SweepRunner.init_workers!(; mode=:auto)