# Module: tf_agents.specs.bandit_spec_utils

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/specs/bandit_spec_utils.py) |

Bandit related tensor spec utilities.

## Functions

[`create_per_arm_observation_spec(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/specs/bandit_spec_utils/create_per_arm_observation_spec): Creates an observation spec with per-arm features and possibly action mask.

[`drop_arm_observation(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/specs/bandit_spec_utils/drop_arm_observation): Drops the per-arm observation from a given trajectory/trajectory spec.

[`get_context_dims_from_spec(...)`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/specs/bandit_spec_utils/get_context_dims_from_spec): Returns the global and per-arm context dimensions.

<br />

<br />

<br />

| ## Other Members ||
|---|---|
| CONSTRAINTS_SPEC_KEY | `'constraint'` |
| GLOBAL_FEATURE_KEY | `'global'` |
| NUM_ACTIONS_FEATURE_KEY | `'num_actions'` |
| PER_ARM_FEATURE_KEY | `'per_arm'` |
| REWARD_SPEC_KEY | `'reward'` |
| absolute_import | Instance of `__future__._Feature` |
| division | Instance of `__future__._Feature` |
| print_function | Instance of `__future__._Feature` |

<br />