Skip to content

Commit

Permalink
Fix collision between fixed params and defaults
Browse files Browse the repository at this point in the history
When there are no variable params and only fixed params for
A and fee, the defaults will override the fixed params.

Deleting from the defaults if it's in the fixed params
will handle any possible collision.
  • Loading branch information
chanhosuh committed Jul 22, 2023
1 parent 1df80a4 commit 24c81d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion curvesim/pipelines/vol_limited_arb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ def pipeline(
cpu_count = os.cpu_count()
ncpu = cpu_count if cpu_count is not None else 1

variable_params = variable_params or DEFAULT_PARAMS
default_params = DEFAULT_PARAMS.copy()
for key in default_params:
if key in fixed_params:
del default_params[key]

variable_params = variable_params or default_params
metrics = metrics or DEFAULT_METRICS

if pool_data_cache is None:
Expand Down

0 comments on commit 24c81d0

Please sign in to comment.