Skip to content

Add support for asynchronous workers #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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: 2 additions & 1 deletion docs/literate_example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ observations .= process_member_data(SimDir(simulation.output_dir))
# The simplest backend is the `JuliaBackend`, which runs all ensemble members sequentially and does not require `Distributed.jl`.
# For more information, see the [`Backends`](https://clima.github.io/ClimaCalibrate.jl/dev/backends/) page.
eki = CAL.calibrate(
CAL.WorkerBackend,
CAL.JuliaBackend,
#md # CAL.WorkerBackend # We can't use this backend in Literate.jl
ensemble_size,
n_iterations,
observations,
Expand Down
1 change: 1 addition & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ClimaCalibrate.submit_pbs_job
ClimaCalibrate.initialize
ClimaCalibrate.save_G_ensemble
ClimaCalibrate.update_ensemble
ClimaCalibrate.update_ensemble!
ClimaCalibrate.ExperimentConfig
ClimaCalibrate.get_prior
ClimaCalibrate.get_param_dict
Expand Down
7 changes: 1 addition & 6 deletions src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ function calibrate(
b::Type{WorkerBackend},
config::ExperimentConfig;
failure_rate = DEFAULT_FAILURE_RATE,
worker_pool = default_worker_pool(),
ekp_kwargs...,
)
(; ensemble_size, n_iterations, observations, noise, prior, output_dir) =
Expand All @@ -271,7 +270,6 @@ function calibrate(
prior,
output_dir;
failure_rate,
worker_pool,
ekp_kwargs...,
)
end
Expand All @@ -285,7 +283,6 @@ function calibrate(
prior,
output_dir;
failure_rate = DEFAULT_FAILURE_RATE,
worker_pool = default_worker_pool(),
ekp_kwargs...,
)
eki = ekp_constructor(
Expand All @@ -295,7 +292,7 @@ function calibrate(
noise;
ekp_kwargs...,
)
return calibrate(b, eki, n_iterations, prior, output_dir; worker_pool)
return calibrate(b, eki, n_iterations, prior, output_dir)
end

function calibrate(
Expand All @@ -305,7 +302,6 @@ function calibrate(
prior,
output_dir;
failure_rate = DEFAULT_FAILURE_RATE,
worker_pool = default_worker_pool(),
)
ekp = initialize(ekp, prior, output_dir)
ensemble_size = EKP.get_N_ens(ekp)
Expand All @@ -317,7 +313,6 @@ function calibrate(
iter,
ensemble_size,
output_dir;
worker_pool,
failure_rate,
)
@info "Iteration $iter time: $time"
Expand Down
Loading