Closed waral closed 4 years ago
Hey Michal,
Thanks for reporting! This was indeed a bug, the function _dynamic_partition_of_nested_tensors
in mixture_agent.py
did not handle empty nests correctly, and returned an empty list instead of a list of empty nests.
This change:
https://github.com/tensorflow/agents/commit/4f05181bf10453073d97d35cbe20dc995e988cdb
should fix it.
I'm getting the following error when running an
Exp3MixtureAgent
with two agents:The problem occurs in
_train()
method ofMixtureAgent
below:The problem apparently occurs because
partitioned_nested_infos
is an empty list (the other lists in the loop are fine, I checked that). The thing is that I'm not using any info (i.e. just the default one) for all the sub-policies andoriginal_infos
above is aPolicyInfo
with the default parameters, i.ePolicyInfo(log_probability=(), predicted_rewards_mean=(), predicted_rewards_optimistic=(), predicted_rewards_sampled=(), bandit_policy_type=())
(single object, not a list). When I setpolicy_info=original_infos
in the loop at the end of the method, everything seems to be working fine.Is it a bug or am I doing something wrong?
Thanks so much for your help!