Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions projects/ExampleMonteCarlo/report/report.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions projects/ExampleMonteCarlo/scripts/collect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 5 additions & 2 deletions projects/ExampleMonteCarlo/scripts/compute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions projects/ExampleSweep/report/report.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions projects/ExampleSweep/scripts/collect.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 5 additions & 3 deletions projects/ExampleSweep/scripts/compute.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading