Table of Contents

Struct AsyncWorkerError

Namespace
Gym.Vector
Assembly
Gym.dll

A worker's failure, as Gymnasium's error queue holds it: the worker's index, the exception (rethrown to the vector env's caller as it was thrown) and its text with the stack trace (Python's traceback.format_exc()).

public readonly record struct AsyncWorkerError : IEquatable<AsyncWorkerError>
Implements
Inherited Members
Extension Methods

Constructors

AsyncWorkerError(int, Exception, string)

A worker's failure, as Gymnasium's error queue holds it: the worker's index, the exception (rethrown to the vector env's caller as it was thrown) and its text with the stack trace (Python's traceback.format_exc()).

public AsyncWorkerError(int Index, Exception Exception, string Trace)

Parameters

Index int

The failing worker's sub-env.

Exception Exception

The exception.

Trace string

The exception's text with its .NET stack trace, ending with a newline as Python's does; logged by the parent.

Properties

Exception

The exception.

public Exception Exception { get; init; }

Property Value

Exception

Index

The failing worker's sub-env.

public int Index { get; init; }

Property Value

int

Trace

The exception's text with its .NET stack trace, ending with a newline as Python's does; logged by the parent.

public string Trace { get; init; }

Property Value

string