If you have to consider context or state information when using the multi-armed bandit algorithm, the what you need is the Contextual MAB. In this video, I explain and also demonstrate how to implement a Deep Contextual Multi-Armed Bandit RL agent using PyTorch.
Use this link to access the notebook : https://colab.research.google.com/drive/1OOBHf6ctHUmbUgl3QjBdGeVA4ImmGUuw?usp=sharing