Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining
The ULearningAgentsFlowMatchingTrainer enables imitation learning with flow matching. Inference actions are generated by integrating the learned velocity field with ODE approximates.
| Name | ULearningAgentsFlowMatchingTrainer |
| Type | class |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Public/LearningAgentsFlowMatchingTrainer.h |
| Include Path | #include "LearningAgentsFlowMatchingTrainer.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Blueprintable)
class ULearningAgentsFlowMatchingTrainer : public ULearningAgentsManagerListener
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → ULearningAgentsManagerListener → ULearningAgentsFlowMatchingTrainer
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| -- Setup -- | LearningAgentsFlowMatchingTrainer.h | ||
ULearningAgentsFlowMatchingTrainer
(
FVTableHelper& Helper |
LearningAgentsFlowMatchingTrainer.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~ULearningAgentsFlowMatchingTrainer() |
LearningAgentsFlowMatchingTrainer.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActionId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| bHasTrainingFailed | bool | True if trainer encountered an unrecoverable error during training (e.g. the trainer process timed out). | LearningAgentsFlowMatchingTrainer.h |
|
| bIsTraining | bool | True if training is currently in-progress. Otherwise, false. | LearningAgentsFlowMatchingTrainer.h |
|
| DecoderNetworkId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| DenoiserNetworkId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| EncoderNetworkId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| Interactor | TObjectPtr< ULearningAgentsInteractor > | --Private Data -- | LearningAgentsFlowMatchingTrainer.h |
|
| MemoryStateId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| Model | TObjectPtr< ULearningAgentsFlowMatching > | The flow matching model being trained. | LearningAgentsFlowMatchingTrainer.h |
|
| ObservationId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| ReplayBuffer | TUniquePtr< UE::Learning::FReplayBuffer > | LearningAgentsFlowMatchingTrainer.h | ||
| ReplayBufferId | int32 | LearningAgentsFlowMatchingTrainer.h | ||
| Trainer | TSharedPtr< UE::Learning::IExternalTrainer > | LearningAgentsFlowMatchingTrainer.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginTraining
(
const ULearningAgentsRecording* Recording, |
Begins the training process with the provided settings. | LearningAgentsFlowMatchingTrainer.h |
|
void EndTraining() |
Stops the training process. | LearningAgentsFlowMatchingTrainer.h |
|
void ExportToFile
(
UE::Learning::FFileTrainer& FileTrainer, |
Exports training materials to file, only performing work needed for the requested export flags. | LearningAgentsFlowMatchingTrainer.h | |
bool HasTrainingFailed () |
Returns true if the trainer has failed to communicate with the external training process. | LearningAgentsFlowMatchingTrainer.h |
|
bool IsTraining() |
Returns true if the trainer is currently training; Otherwise, false. | LearningAgentsFlowMatchingTrainer.h |
|
void IterateTraining() |
Iterates the training process and gets the updated Denoiser network. | LearningAgentsFlowMatchingTrainer.h |
|
void RunTraining
(
const ULearningAgentsRecording* Recording, |
Convenience function that runs a basic training loop. | LearningAgentsFlowMatchingTrainer.h |
|
void SetupFlowMatchingTrainer
(
ULearningAgentsManager* InManager, |
Initializes the flow matching trainer and runs the setup functions. | LearningAgentsFlowMatchingTrainer.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Will automatically call EndTraining if training is still in-progress when the object is destroyed. | LearningAgentsFlowMatchingTrainer.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static ULearningAgentsFlowMatchingTrainer * MakeFlowMatchingTrainer
(
ULearningAgentsManager*& InManager, |
Constructs the flow matching trainer and runs the setup functions. | LearningAgentsFlowMatchingTrainer.h |
|
See Also
-
ULearningAgentsFlowMatching for the Denoiser class that performs ODE integration during inference.
-
ULearningAgentsRecorder to understand how to make new recordings.