Skip to content

Commit

Permalink
Fix format errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kcreekdev authored Apr 21, 2024
1 parent 70ce1bc commit 48614e3
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cs-config/cs_config/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,12 @@ def run_model(meta_param_dict, adjustment):

# Dask parmeters
num_workers = 2
memory_per_worker = "10GiB"
client = Client(n_workers=num_workers, threads_per_worker=1, memory_limit=memory_per_worker)
memory_limit = "10GiB"
client = Client(
n_workers=num_workers,
threads_per_worker=1,
memory_limit=memory_per_worker,
)
# TODO: Swap to these parameters when able to specify tax function
# and model workers separately
# num_workers_txf = 5
Expand Down Expand Up @@ -294,7 +298,11 @@ def run_model(meta_param_dict, adjustment):
)
client.close()
del client
client = Client(n_workers=num_workers, threads_per_worker=1, memory_limit=memory_per_worker)
client = Client(
n_workers=num_workers,
threads_per_worker=1,
memory_limit=memory_per_worker,
)
# update tax function parameters in Specifications Object
d_base = c_base.get_dict()
# additional parameters to change
Expand All @@ -311,7 +319,11 @@ def run_model(meta_param_dict, adjustment):
base_ss_dir = os.path.join(base_dir, "SS", "SS_vars.pkl")
client.close()
del client
client = Client(n_workers=num_workers, threads_per_worker=1, memory_limit=memory_per_worker)
client = Client(
n_workers=num_workers,
threads_per_worker=1,
memory_limit=memory_per_worker,
)
with open(base_ss_dir, "wb") as f:
pickle.dump(base_ss, f)
if time_path:
Expand Down

0 comments on commit 48614e3

Please sign in to comment.