Closed Deepakgthomas closed 8 months ago
You need to import your library, which contains your custom env
example:
import gymnasium
import my_library # contains "my_environment"
env = gymnasium.make("my_environment")
You will need to include in the my_library/__init__.py
the registration code but the code above should work. Let us know if you still have issues
Question
Can I access a custom gymnasium environment from outside its directory? This is how I call my
gym
environment -I have attached a picture of the structure of my folder. Basically, I am following the instructions given over here - https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/
I already tried this -
My solution -
In order to call your custom environment from a folder external to that where your custom gym was created, you need to modify the entry_point variable -
Could someone kindly confirm if this is the right approach? Many thanks!