Reinforcement Learning
ml-agents
TensorBoard
ONNX
Pyramids
deep-reinforcement-learning
ML-Agents-Pyramids
Instructions to use AnnaMats/ppo-Pyramids-Training with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ml-agents
How to use AnnaMats/ppo-Pyramids-Training with ml-agents:
mlagents-load-from-hf --repo-id="AnnaMats/ppo-Pyramids-Training" --local-dir="./downloads"
- Notebooks
- Google Colab
- Kaggle
Download ml-agents/mlagents/trainers/optimizer/optimizer.py from AnnaMats/ppo-Pyramids-Training: direct link, hf CLI and curl.
- Browser
- Download file 792 Bytes
-
https://huggingface.co/AnnaMats/ppo-Pyramids-Training/resolve/main/ml-agents/mlagents/trainers/optimizer/optimizer.py
- Command line
-
hf download hf://AnnaMats/ppo-Pyramids-Training/ml-agents/mlagents/trainers/optimizer/optimizer.py
-
curl -L -o optimizer.py https://huggingface.co/AnnaMats/ppo-Pyramids-Training/resolve/main/ml-agents/mlagents/trainers/optimizer/optimizer.py
792 Bytes
| import abc | |
| from typing import Dict | |
| from mlagents.trainers.buffer import AgentBuffer | |
| class Optimizer(abc.ABC): | |
| """ | |
| Creates loss functions and auxillary networks (e.g. Q or Value) needed for training. | |
| Provides methods to update the Policy. | |
| """ | |
| def __init__(self): | |
| self.reward_signals = {} | |
| def update(self, batch: AgentBuffer, num_sequences: int) -> Dict[str, float]: | |
| """ | |
| Update the Policy based on the batch that was passed in. | |
| :param batch: AgentBuffer that contains the minibatch of data used for this update. | |
| :param num_sequences: Number of recurrent sequences found in the minibatch. | |
| :return: A Dict containing statistics (name, value) from the update (e.g. loss) | |
| """ | |
| pass | |