Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Assistance with ts_train.py Error #2

Open
SanaNazerian opened this issue Dec 11, 2024 · 7 comments
Open

Request for Assistance with ts_train.py Error #2

SanaNazerian opened this issue Dec 11, 2024 · 7 comments

Comments

@SanaNazerian
Copy link

Dear Xiong,
First of all, I want to apologize if my question seems too simple, but I am currently stuck and need some guidance.

I was trying to run the ts_train.py script using the command: python ts_train.py --config cfg/config.yaml --device 0
However, I encountered the following error:
gymnasium.error.NameNotFound: Environment OnlinePack doesn't exist.
could you please help me to solve this error, I also attached the whole error.
thank you for your time and support.

GOPT.txt

@Xiong5Heng
Copy link
Owner

Could you please show me your config,yaml?
The error is "Environment OnlinePack doesn't exist.", but the default env name in configuration file is "OnlinePack-v1"

@Xiong5Heng
Copy link
Owner

You can use the following script to check whether the environment can be registered successfully.

from tools import *
import gymnasium as gym

container_size = [110, 70, 40]

lower = 10
higher = 20
resolution = 1
item_size_set = []
for i in range(lower, higher + 1, 2):
    for j in range(lower, higher + 1, 2):
        for k in range(lower, higher + 1, 2):
            item_size_set.append((i * resolution, j * resolution, k * resolution))
registration_envs()
env = gym.make("OnlinePack-v1", container_size=container_size, item_set=item_size_set)

print(env.observation_space.shape)

@SanaNazerian
Copy link
Author

You can use the following script to check whether the environment can be registered successfully.

from tools import *
import gymnasium as gym

container_size = [110, 70, 40]

lower = 10
higher = 20
resolution = 1
item_size_set = []
for i in range(lower, higher + 1, 2):
    for j in range(lower, higher + 1, 2):
        for k in range(lower, higher + 1, 2):
            item_size_set.append((i * resolution, j * resolution, k * resolution))
registration_envs()
env = gym.make("OnlinePack-v1", container_size=container_size, item_set=item_size_set)

print(env.observation_space.shape)

Thanks for your response. The above script runs without error but when I want to start the training I get the "OnlinePack doesn't exist" error.
Also I did not make any changes in the config file, the default env name in the configuration file is "OnlinePack-v1".

@Xiong5Heng
Copy link
Owner

Check if the versions of all libraries are consistent with those in the readme,
If consistent,
set num_processes: 1 in config.yaml, run the training script in a single thread, and check whether there are errors,
and then set num_processes: 2, and run the training script in multithreading mode;

if not, you need to reconfigure the environment.

@husserWX
Copy link

Dear Xiong,
hello, i met the same question. but i run the code on windows, is that cause the problem?
thank you for your time and support.

@Xiong5Heng
Copy link
Owner

Dear Xiong, hello, i met the same question. but i run the code on windows, is that cause the problem? thank you for your time and support.

We have not tested the repo in Windows, so we do not know whether it is the cause of the problem.

@husserWX
Copy link

Dear Xiong, hello, i met the same question. but i run the code on windows, is that cause the problem? thank you for your time and support.

We have not tested the repo in Windows, so we do not know whether it is the cause of the problem.

i try the code on ubuntu again, code run with no err。 thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants