question

Marcos Rabello avatar image
0 Likes"
Marcos Rabello asked Jason Lightfoot commented

Error machine learning tutorial enviroment how to solve?

Executei o tutorial de aprendizado de máquina e apareceu o seguinte erro "AssertionError: Seu ambiente deve herdar a classe gymnasium.Env cf." Como resolver?

1696622135622.png

FlexSim 23.1.4
machine learning
1696622135622.png (28.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @Marcos Rabello, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered

Hey @Marcos Rabello, you're probably getting this error because the example code given by FlexSim was built using the original gym.Env api. Stable_baselines3 has since moved towards using gymnasium.Env and other related classes. You can see my post explaining this here.

Additionally, if you've modified your files to include external packages, you may want to make sure they're available outside of your anaconda environment. You can refer to this answer about FlexSim and python environments.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.