Module: tf_agents.bandits.specs.utils

Bandit related tensor spec utilities.

Functions

create_per_arm_observation_spec(...): Creates an observation spec with per-arm features and possibly action mask.

drop_arm_observation(...): Drops the per-arm observation from a given trajectory (or trajectory spec).

get_context_dims_from_spec(...): Returns the global and per-arm context dimensions.

CONSTRAINTS_SPEC_KEY 'constraint'
GLOBAL_FEATURE_KEY 'global'
NUM_ACTIONS_FEATURE_KEY 'num_actions'
PER_ARM_FEATURE_KEY 'per_arm'
REWARD_SPEC_KEY 'reward'