Skip to content

Commit

Permalink
Do not use allow_kargs decorator in get_multiply_weights function
Browse files Browse the repository at this point in the history
  • Loading branch information
timmens committed Sep 29, 2023
1 parent 70d1b07 commit 04ffdf5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lcm/model_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from dags import concatenate_functions
from dags.signature import with_signature

from lcm.dispatchers import allow_kwargs, productmap
from lcm.dispatchers import productmap
from lcm.function_evaluator import get_function_evaluator
from lcm.functools import all_as_kwargs
from lcm.functools import all_as_args, all_as_kwargs


def get_utility_and_feasibility_function(
Expand Down Expand Up @@ -130,9 +130,9 @@ def get_multiply_weights(stochastic_variables):
"""
arg_names = [f"weight_next_{var}" for var in stochastic_variables]

@allow_kwargs
@with_signature(args=arg_names)
def _outer(*args):
def _outer(*args, **kwargs):
args = all_as_args(args, kwargs, arg_names=arg_names)
return jnp.prod(jnp.array(args))

return productmap(_outer, variables=arg_names)
Expand Down

0 comments on commit 04ffdf5

Please sign in to comment.