-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Describe the bug
When I am running the custom_strategy.ipynb, there is a Type error:TakeSteps.init() missing 1 required positional argument: 'state_name'. I think this is due to api change and could be easily fixed when adding the state name
To Reproduce
Steps to reproduce the behavior:
- Go to custom_strategy.ipynb
- Click on run
- See error
Screenshots
Possible Solution
from flowMC.resource.states import State
state = State(
data={
"positions": "positions",
"log_prob": "log_prob",
"acceptance": "acceptance",
}
)
resource = {
"state": state, # adding this
"positions": positions,
"log_prob": log_prob,
"acceptance": acceptance,
"RWMCMC": RWMCMC_sampler,
"logpdf": LogPDF(target_log_prob, n_dims=n_dims),
}
strategy = {
"take_serial_step": TakeSerialSteps(
logpdf_name="logpdf",
kernel_name="RWMCMC",
state_name="state", #adding this
buffer_names=["positions", "log_prob", "acceptance"],
n_steps=n_steps,
)
}