Skip to content

Commit

Permalink
Issue 137: unify argument patterns (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBrand1 authored Nov 19, 2024
1 parent 1482fbb commit ed43ad5
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pipelines/build_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def build_model_from_dir(model_dir):
- 1
)

priors = runpy.run_path(prior_path)
priors = runpy.run_path(str(prior_path))

right_truncation_offset = model_data["right_truncation_offset"]

Expand Down
2 changes: 1 addition & 1 deletion pipelines/fit_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def fit_and_save_model(
description="Fit the hospital-only wastewater model."
)
parser.add_argument(
"--model_run_dir",
"model_run_dir",
type=Path,
help=(
"Path to a directory containing model fitting data. "
Expand Down
2 changes: 1 addition & 1 deletion pipelines/generate_predictive.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_and_save_predictions(
description=("Do posterior prediction from a pyrenew-hew fit.")
)
parser.add_argument(
"model-run-dir",
"model_run_dir",
type=Path,
help=(
"Path to a directory containing the model fitting data "
Expand Down
2 changes: 1 addition & 1 deletion pipelines/iteration_helpers/loop_fit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ BASE_DIR="$1"
for SUBDIR in "$BASE_DIR"/*/; do
# Run the Python script with the current subdirectory as the model_dir argument
echo "$SUBDIR"
python fit_model.py --model_run_dir "$SUBDIR"
python fit_model.py "$SUBDIR"
done
2 changes: 1 addition & 1 deletion pipelines/iteration_helpers/loop_generate_predictive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ BASE_DIR="$1"
for SUBDIR in "$BASE_DIR"/*/; do
# Run the Python script with the current subdirectory as the model_dir argument
echo "$SUBDIR"
python generate_predictive.py --model_dir "$SUBDIR" --n_forecast_points 28
python generate_predictive.py "$SUBDIR" --n-forecast-points 28
done
2 changes: 1 addition & 1 deletion pipelines/iteration_helpers/loop_postprocess.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ BASE_DIR="$1"
for SUBDIR in "$BASE_DIR"/*/; do
# Run the R script with the current subdirectory as the model_dir argument
echo "$SUBDIR"
Rscript postprocess_state_forecast.R --model-run-dir "$SUBDIR"
Rscript postprocess_state_forecast.R "$SUBDIR"
done
2 changes: 1 addition & 1 deletion pipelines/score_forecast.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ read_and_score_location <- function(model_run_dir,
# Create a parser
p <- arg_parser("Score a single location forecast") |>
add_argument(
"model-run-dir",
"model_run_dir",
help = "Directory containing the model data and output."
)

Expand Down

0 comments on commit ed43ad5

Please sign in to comment.