How to pass argument to the policy compute action function when using local_policy_inference?

I am using enable_connector using training for RLLib. During inference I am using the code given in serving and inference example here. How do I pass paramters like explore=False to the compute action function of the policy when using local_policy_inference?

@MHamza-Y Thanks for posting.

cc: @arturn @gjoliver

@MHamza-Y In this case, the policy will use the exploration setting configured by it’s config at Policy.config. You should be able to change it by setting Policy.config.exploration = False
local_policy_inference() is a super small helper function that RLlib does not depend on though, so you can simply copy the code over and modify it to your liking and it should work.
Admittedly, it is a rough edge in our API.
I’m logging an issue → [RLlib] local_policy_inference should allow users to specify exploration=True/False · Issue #35663 · ray-project/ray · GitHub
Thanks for raising this!

Maybe @gjoliver has more to say about this.

Thanks for the feedback.
I took a look at local_policy_inference(), we probably just need explore and timestamp fields for inference.
So it should be a super quick change.