Table of Contents

Enum VectorizeMode

Namespace
Gym.Envs.Registration
Assembly
Gym.dll

How MakeVec vectorizes an env: Sync steps copies made with Make one after another (SyncVectorEnv), Async runs them in parallel on worker threads (AsyncVectorEnv, DR-22), and VectorEntryPoint builds the env's own vectorized class from its spec's vector_entry_point (CartPoleVectorEnv), which is also the default whenever a spec has one.

[PyEnum("VectorizeMode")]
public enum VectorizeMode
Extension Methods

Fields

[PyName("ASYNC")] [PyValue("async")] Async = 0

Gymnasium's VectorizeMode.ASYNC ("async"): sub-envs in parallel, on worker threads in Gym.NET (DR-22).

[PyName("SYNC")] [PyValue("sync")] Sync = 1

Gymnasium's VectorizeMode.SYNC ("sync"): sub-envs one after another on the calling thread.

[PyName("VECTOR_ENTRY_POINT")] [PyValue("vector_entry_point")] VectorEntryPoint = 2

Gymnasium's VectorizeMode.VECTOR_ENTRY_POINT ("vector_entry_point"): the env's own vectorized class.

Remarks

A C# enum (DR-77, DR-84) that stands for Gymnasium's Python Enum (PyEnumAttribute), as AutoresetMode does: VectorizeModes gives a member's Python name, value, str and repr (<VectorizeMode.SYNC: 'sync'>) and parses VectorizeMode("sync"); MakeVec takes a member or its string.

Footgun: a member's ToString() is its C# name ("Sync"), not Python's value ("sync"); use Value(VectorizeMode) for the string Gymnasium records.

Reference: gymnasium/envs/registration.py.