Skip to content

[Backfill corrections] Allocate enough shared memory for parallel prediction generation #1827

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

Merged
merged 5 commits into from
Apr 12, 2023
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
5 changes: 4 additions & 1 deletion backfill_corrections/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ run-local: setup-dirs
grep "backfill correction completed successfully" $(LOG_FILE)
grep "scheduled core" $(LOG_FILE) ; \
[ "$$?" -eq 1 ]
grep "SIGBUS" $(LOG_FILE) ; \
[ "$$?" -eq 1 ]

gurobi.lic:
@echo WLSACCESSID=$(GRB_WLSACCESSID) >> $(GRB_LICENSE_FILE)
Expand All @@ -81,6 +83,7 @@ run:
-v "`realpath $(USR_CACHE_DIR)`:/backfill_corrections/${CACHE_DIR}" \
-v "${PWD}"/params.json:/backfill_corrections/params.host.json \
--env GRB_LICENSE_FILE=$(GRB_LICENSE_FILE) \
--shm-size=2gb \
-it "${DOCKER_IMAGE}:${DOCKER_TAG}" \
/bin/bash -c "cp params.host.json params.json && make gurobi.lic && make standardize-dirs && make run-local OPTIONS=\"${OPTIONS}\" LOG_FILE=${LOG_FILE}"

Expand Down Expand Up @@ -124,7 +127,7 @@ standardize-dirs:
$(PYTHON) -m delphi_utils set export_dir $(EXPORT_DIR)

clean:
rm -f $(USR_EXPORT_DIR)/*.csv.gz
rm -rf $(USR_EXPORT_DIR)/*

coverage:
Rscript -e 'covr::package_coverage("delphiBackfillCorrection")'
Expand Down
1 change: 1 addition & 0 deletions backfill_corrections/delphiBackfillCorrection/R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ run_backfill <- function(df, params,
msg_ts("Splitting data into geo groups")
group_dfs <- group_split(df, geo_value)

msg_ts("Beginning training and/or testing...")
# Build model for each location
apply_fn <- ifelse(params$parallel, mclapply, lapply)
result <- apply_fn(group_dfs, function(subdf) {
Expand Down