8000 WARN: env.P to get variables from other wrappers is deprecated · Issue #18 · jlm429/bettermdptools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
WARN: env.P to get variables from other wrappers is deprecated #18
Open
@MatthewFletcher

Description

@MatthewFletcher

Using the example tutorial code from the ReadMe:

import gymnasium as gym


from bettermdptools.algorithms.planner import Planner
from bettermdptools.utils.plots import Plots

# make gym environment 
frozen_lake = gym.make('FrozenLake8x8-v1', render_mode=None)

# run VI
V, V_track, pi = Planner(frozen_lake.P).value_iteration()

#plot state values
size=(8,8)
Plots.values_heat_map(V, "Frozen Lake\nValue Iteration State Values", size)

I get the following warning:

UserWarning: WARN: env.P to get variables from other wrappers is deprecated and will be removed in v1.0, to get this variable you can do `env.unwrapped.P` for environment variables or `env.get_wrapper_attr('P')` that will search the reminding wrappers.

I know it's just a warning, but this should probably be updated to us 4E16 e the modern wrapper technique.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0