alexfrom0815 / Online-3D-BPP-DRL

This repository contains the implementation of paper Online 3D Bin Packing with Constrained Deep Reinforcement Learning.
292 stars 66 forks source link

Are there something wrong with readme? #21

Closed Shawn9257 closed 10 months ago

Shawn9257 commented 10 months ago

Firstly, the code here with argement.py not config.py Secondly, the train parameter with load model doesn't get true or false. Also, the code here isn't accept (0,1,2,3) for Cuda device. (same as [0,1,2,3])

alexfrom0815 commented 10 months ago

Thanks for the feedback!

  1. config.py is aborted now, we only use arguments.py now
  2. I can't figure out this question, can you explain it?
  3. I run 'python main.py --device 0' in my laptop, and it succeed
Shawn9257 commented 10 months ago

For quesiton2 :

Online-3D-BPP-DRL-main# python main.py --mode train --load-model True --use-cuda --item-seq cut2
usage: main.py [-h] [--mode MODE] [--env_name ENV_NAME]
               [--container_size CONTAINER_SIZE] [--enable-rotation]
               [--load-model] [--load-name LOAD_NAME] [--data-name DATA_NAME]
               [--item-size-range ITEM_SIZE_RANGE] [--use-cuda]
               [--tensorboard] [--preview PREVIEW] [--item-seq ITEM_SEQ]
               [--algorithm ALGORITHM] [--gamma GAMMA]
               [--entropy_coef ENTROPY_COEF]
               [--value_loss_coef VALUE_LOSS_COEF]
               [--invalid_coef INVALID_COEF] [--hidden_size HIDDEN_SIZE]
               [--learning_rate LEARNING_RATE] [--eps EPS] [--alpha ALPHA]
               [--num_processes NUM_PROCESSES] [--device DEVICE]
               [--save_interval SAVE_INTERVAL] [--log_interval LOG_INTERVAL]
               [--save_model] [--cases CASES] [--pretrain]
               [--num_steps NUM_STEPS] [--enable_rotation]
               [--data_name DATA_NAME] [--load_name LOAD_NAME]
               [--load_dir LOAD_DIR] [--save_dir SAVE_DIR] [--seed SEED]
               [--jump JUMP]
main.py: error: unrecognized arguments: True

Online-3D-BPP-DRL-main# python main.py --mode train --load-model False --use-cuda --item-seq cut2
usage: main.py [-h] [--mode MODE] [--env_name ENV_NAME]
               [--container_size CONTAINER_SIZE] [--enable-rotation]
               [--load-model] [--load-name LOAD_NAME] [--data-name DATA_NAME]
               .......
main.py: error: unrecognized arguments: False

Online-3D-BPP-DRL-main# python main.py --mode train --load-model False --use-cuda --item-seq rs
usage: main.py [-h] [--mode MODE] [--env_name ENV_NAME]
               [--container_size CONTAINER_SIZE] [--enable-rotation]
               [--load-model] [--load-name LOAD_NAME] [--data-name DATA_NAME]
               .......
main.py: error: unrecognized arguments: False

Is --load-model here is used without True/False?

However in readme page :

Example: Train a new model on sequences generated randomly.
You can run 'python main.py --mode train --load-model False --use-cuda --item-seq rs'.
It will take about one day to get a model with satisfying performance.

You can run 'python main.py --help' for some information of common parameters.
There are many other parameters of our project in 'config.py', and all of them are given default values. You can change it if you like.

For Question3:

This may be a misunderstanding on my part, I try to use multiple GPU in code that is not distributed. I try to use more than one device when I try to run the train in a bigger container_size.

alexfrom0815 commented 10 months ago

For quesiton2 : Thanks for pointing out this, there needs no parameter after --load-model. Just use 'python main.py' to train from scratch or use 'python main.py --load-model' to choose a pretrained model. For Question3: That's true, we have not added multiple GPU training since we believe only adding GPU cannot solve such an NP-hard problem. So we recommend PCT https://github.com/alexfrom0815/Online-3D-BPP-PCT, this can solve packing with larger scale