Skip to content

URPCGymConnector

A connection to an external gym API implemented in Python, using gRPC for communication.

class URPCGymConnector : public UExternalGymConnector

Methods

URPCGymConnector

URPCGymConnector()

End of Settings.


RequestStateUpdate

virtual TFuture<FTrainingStateUpdate *> RequestStateUpdate() override

Request a state update from the gym API using the current state of the agents from environments.


SubmitState

virtual void SubmitState(const FTrainingState &InTrainingState) override

Submit the current training state to the external training system.

Parameters

  • InTrainingState (const FTrainingState)

SubmitStateWithInitialState

virtual void
SubmitStateWithInitialState(const FTrainingState &InTrainingState,
const FInitialState &InInitialAgentStates) override

Submit both training state and initial state (for environments that reset).

Parameters

  • InTrainingState (const FTrainingState)

  • InInitialAgentStates (const FInitialState)


SubmitInitialState

virtual void
SubmitInitialState(const FInitialState &InInitialAgentStates) override

Submit only the initial state (for reset-only operations).

Parameters

  • InInitialAgentStates (const FInitialState)

Init

virtual void Init(const FTrainingDefinition &AgentDefns) override

Initialize the connector with the given training definitions.

Parameters

  • AgentDefns (const FTrainingDefinition)

CheckForStart

virtual bool CheckForStart() override

Check if the start request has been received.


GetAutoResetType

virtual EAutoResetType GetAutoResetType() override

Get the auto-reset behavior for this connector.

Attributes

bRunScriptOnPlay

bool bRunScriptOnPlay = false

Settings.


ServerSettings

FRPCServerSettings ServerSettings

Listen address and port for the gym gRPC service.


ScriptSettings

FTrainingScriptSettings ScriptSettings

The settings for the python script to be launched.


Script

FLaunchableScript Script

Runtime handle for the training script process when bRunScriptOnPlay is enabled.

Source: Source/ScholaProtobuf/Public/GymConnectors/gRPC/gRPCGymConnector.h