This project releases our 1st place solution on NeurIPS2021 ML4CO Dual Task.
Arxiv, Slide and model weights are available.
Follow the tutorials of ml4co-competition to download ML4CO instance dataset and set up your Python dependencies. Suppose the directory of instance dataset is /YOUR_PATH/ml4co-competition/instances
. The dependencies of KIDA can be found in ./Nuri/conda.yaml
. Anaconda environment of ml4co can be created by source init.sh
Download model weights and put them in /YOUR_PATH/NeurIPS2021-ML4CO-KIDA/Nuri/
.
Copy the submission files to ml4co-competition directory.
cp -r /YOUR_PATH/NeurIPS2021-ML4CO-KIDA/Nuri/ /YOUR_PATH/ml4co-competition/submissions/
Evaluate models in dual task by running the following commands.
cd /YOUR_PATH/ml4co-competition/submissions/Nuri
conda activate ml4co
python ../../common/evaluate.py dual item_placement
python ../../common/evaluate.py dual load_balancing
python ../../common/evaluate.py dual anonymous
Modify the configuration file in ./train_files/configs
to meet the needs of the local environment.
./train_files/configs/dataset.ini
is the configuration file for data generation process. DATASET_DIR
decides the directory where the instance dataset is stored. STORE_DIR
decides the directory where generated data is stored. NODE_RECORD_PROB
decides the probability of using Strong Branching when collecting data. TIME_LIMIT
decides the time limit for SCIP solver. POLICY_TYPE
decides the model we use (0 for Item Placement Benchmark, 1 for Workload Apportionment Benchmark and 2 for Anonymous Benchmark).
./train_files/configs/train.ini
is the configuration file for training process. STORE_DIR
decides the directory where training files are stored (It must keep the same as STORE_DIR
in dataset.ini
). TRAIN_NUM
and VALID_NUM
decide the number of data used in training process for each epoch.
Then, run the following commands to train the model.
cd /YOUR_PATH/NeurIPS2021-ML4CO-KIDA/train_files
# Train Item Placement Benchmark
source item.sh
# Train Workload Apportionment Benchmark
source load.sh
# Train Anonymous Benchmark
source ano.sh