Navigation
API > API/Plugins > API/Plugins/LearningTraining
Inheritance Hierarchy
- IExternalTrainer
- FSocketTrainer
References
| Module | LearningTraining |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningTraining/Public/LearningExternalTrainer.h |
| Include | #include "LearningExternalTrainer.h" |
Syntax
struct FSocketTrainer : public UE::Learning::IExternalTrainer
Remarks
Trainer that connects to an external training server to perform training
This trainer can be used to allow the python training process the run on a different machine to the experience gathering process.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSocketTrainer
(
ETrainerResponse& OutResponse, |
Creates a new Socket trainer |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Overridden from IExternalTrainer
| Type | Name | Description | |
|---|---|---|---|
| int32 | AddNetwork
(
const ULearningNeuralNetworkData& Network |
Adds the network to this external trainer. | |
| int32 | AddReplayBuffer
(
const FReplayBuffer& ReplayBuffer |
Adds a named replay buffer to this external trainer. | |
| bool | Returns true if we can receive a network or training completed. Otherwise, false. | ||
| ETrainerResponse | ReceiveNetwork
(
const int32 NetworkId, |
Wait for the trainer to push an updated network. | |
| ETrainerResponse | SendConfig
(
const TSharedRef< FJsonObject >& ConfigObject, |
Sends the given json config to the trainer process. | |
| ETrainerResponse | SendNetwork
(
const int32 NetworkId, |
Wait for the trainer to be ready and push the current policy network. | |
| ETrainerResponse | SendReplayBuffer
(
const int32 ReplayBufferId, |
Wait for the trainer to be ready and send new experience. | |
| ETrainerResponse | SendStop () |
Signal for the trainer to stop. | |
| void | Terminate () |
Terminate the trainer immediately. | |
| ETrainerResponse | Wait () |
Wait for the trainer to finish. |