OpenAi-gymnasium: Huge memory usage even before gym.make()

171 Views Asked by At

When I build a custom gymnasium (formerly gym) environment, and I see in the memory profile the first line, I get some headache.

Where does this huge memory footprint come from? For reference, when I create gymnasium environments like "Taxi-v3", I have only ~35 MiB ...

My general questions for this thread:

  1. How is this first line measured?
  2. Which influencing factors are taken to determine the outlined 82 MiB fdor the line @profile?

Console Output:

Line # Mem usage Increment Occurrences Line Contents

=============================================================

9     82.1 MiB     82.1 MiB           1   @profile

10 82.1 MiB 0 MiB 1 def complete_walkthrough():

11

12 87.5 MiB 5.4 MiB 1 gym_env = gymnasium.make("MyEnv-v0")
13 88.4 MiB 0.9 MiB 1 initial_state, _ = gym_env.reset()

0

There are 0 best solutions below