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="./download: string[]s"
- Notebooks
- Google Colab
- Kaggle
| using System; | |
| using System.Linq; | |
| using System.Text; | |
| using NUnit.Framework; | |
| using Google.Protobuf; | |
| using Unity.MLAgents.Analytics; | |
| using Unity.MLAgents.SideChannels; | |
| using Unity.MLAgents.CommunicatorObjects; | |
| namespace Unity.MLAgents.Tests | |
| { | |
| /// <summary> | |
| /// These tests send messages through the event handling code. | |
| /// There's no output to test, so just make sure there are no exceptions | |
| /// (and get the code coverage above the minimum). | |
| /// </summary> | |
| public class TrainingAnalyticsSideChannelTests | |
| { | |
| [] | |
| public void TestTrainingEnvironmentReceived() | |
| { | |
| var anyMsg = Google.Protobuf.WellKnownTypes.Any.Pack(new TrainingEnvironmentInitialized()); | |
| var anyMsgBytes = anyMsg.ToByteArray(); | |
| var sideChannel = new TrainingAnalyticsSideChannel(); | |
| using (new AnalyticsUtils.DisableAnalyticsSending()) | |
| { | |
| sideChannel.ProcessMessage(anyMsgBytes); | |
| } | |
| } | |
| [] | |
| public void TestTrainingBehaviorReceived() | |
| { | |
| var anyMsg = Google.Protobuf.WellKnownTypes.Any.Pack(new TrainingBehaviorInitialized()); | |
| var anyMsgBytes = anyMsg.ToByteArray(); | |
| var sideChannel = new TrainingAnalyticsSideChannel(); | |
| using (new AnalyticsUtils.DisableAnalyticsSending()) | |
| { | |
| sideChannel.ProcessMessage(anyMsgBytes); | |
| } | |
| } | |
| [] | |
| public void TestInvalidProtobufMessage() | |
| { | |
| // Test an invalid (non-protobuf) message. This should silently ignore the data. | |
| var badBytes = Encoding.ASCII.GetBytes("Lorem ipsum"); | |
| var sideChannel = new TrainingAnalyticsSideChannel(); | |
| using (new AnalyticsUtils.DisableAnalyticsSending()) | |
| { | |
| sideChannel.ProcessMessage(badBytes); | |
| } | |
| // Test an almost-valid message. This should silently ignore the data. | |
| var anyMsg = Google.Protobuf.WellKnownTypes.Any.Pack(new TrainingBehaviorInitialized()); | |
| var anyMsgBytes = anyMsg.ToByteArray(); | |
| var truncatedMessage = new ArraySegment<byte>(anyMsgBytes, 0, anyMsgBytes.Length - 1).ToArray(); | |
| using (new AnalyticsUtils.DisableAnalyticsSending()) | |
| { | |
| sideChannel.ProcessMessage(truncatedMessage); | |
| } | |
| } | |
| } | |
| } | |