benchmarkIncludes comparative experiments with previous work.includeincludeAuxiliary.indexCore components of Chameleon. Workspace is used for training Chameleon.othersBaselines.
- C++17.
- NVIDIA GPU.
- PyTorch with the PyTorch C++ frontend (libtorch).
- Ubuntu 22.04.3 LTS
- AMD 7900X CPU @ 4.7GHz
- 128 GB DDR5 5200Mhz main memory
- NVIDIA GeForce RTX 4070 12GB
- CUDA 12.1
- PyTorch 2.1.0
data_father_pathpath for storing datasetsmodel_father_pathpath for storing models of RLexperience_father_pathpath for storing experiments of DARE
- The example can be seen in any file that includes "CHA:: Index" in the benchmark test.
- To successfully run the code, you need to add the source code baselines of b+tree, alex, pgm, lipp to the others folder. Or delete the baseline related benchmark code and only run the chameleon.
- Before running the chameleon, please make sure that the computer has the necessary cuda, libtorch, and boost libraries installed.
mkdir Release
cd Release
cmake -DCMAKE_BUILD_TYPE=Release..
make
train TSMDPindex/workspace/train_TSMDP.cpptrain DAREindex/workspace/train_DARE.cpprun a benchmarkCore components of Chameleon. Workspace is used for training Chameleon.
Given a default parameterThe constructor for the index requires one parameter. Default parameters can be used, as shown in CHA::Configuration::default_configuration.
This library provides the following classes:
CHA::Index | index/include/Index.hppChameleon index structure.Global_Q_network | index/include/RL_network.hppThe DQN structure for DARE.Small_Q_network | index/include/RL_network.hppThe DQN structure for TSMDP.RewardScalar | index/include/RL_network.hppA simple standardized scaling method.GlobalController | index/include/Controller.hppActor in DARE. The Implementation Process of Combining DQN and GA Algorithms.GlobalController::get_best_action_GA | index/include/Controller.hppGet the best action for a given state.CHA::Configuration | index/include/Configuration.hppImplementation class of parameter matrix M.CHA::Index::get_fanout | index/include/Index.hppGet a fanout with the parameter matrix M with linear interpolation algorithm.main | index/workspace/train_DARE.hppTrain DARE with multiple threads. If there are multiple GPUs and sufficient CPU and main memory resources, the strategy for deploying processes on different GPUs can be appropriately changed.main | index/workspace/train_TSMDP.hppTrain TSMDP.experience_t | index/include/experience.hppImplementation class of experience of DARE.create_dataset | include/DataSet.hppCreate dataset with local-skew distribution where the parameterskewis the skewness degree.local_skew | include/DataSet.hppThe function to measure the local skewness of a dataset.