Skip to content
Merged
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
16 changes: 14 additions & 2 deletions src/dscim/preprocessing/input_damages.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,21 @@ def concatenate_labor_damages(
return concat_ds


def calculate_labor_batch_damages(batch, ec, input_path, save_path):
def calculate_labor_batch_damages(
batch,
ec,
input_path,
save_path,
variable="rebased",
file_prefix="uninteracted_main_model",
):
print(f"Processing batch={batch} damages in {os.getpid()}")
concatenate_labor_damages(
input_path=input_path,
save_path=save_path,
ec_cls=ec,
variable="rebased",
variable=variable,
file_prefix=file_prefix,
val_type="wage-levels",
format_file="zarr",
query=f"exists==True&batch=='batch{batch}'",
Expand All @@ -293,6 +301,8 @@ def calculate_labor_damages(
path_econ,
input_path,
save_path,
variable="rebased",
file_prefix="uninteracted_main_model",
):
ec = EconVars(path_econ)
# process in 3 rounds to limit memory usage
Expand All @@ -302,6 +312,8 @@ def calculate_labor_damages(
input_path=input_path,
save_path=save_path,
ec=ec,
variable=variable,
file_prefix=file_prefix,
)
print("Processing batches:")
print(list(range(i * 5, i * 5 + 5)))
Expand Down