Quick StartΒΆ
REVIVE SDK supports multiple modes of model training. You only need to focus on your business itself, prepare task data that meets the requirements of REVIVE SDK by combining business knowledge, and submit the training task. REVIVE SDK can automatically train the optimal virtual environment model and policy model, thus achieving business simulation and optimization.
To use REVIVE SDK, you need to prepare a decision flowchart that combines task and data features, as well as training data and reward function. REVIVE SDK digitizes the business logic of real-world task scenarios and describes the relationship between business data by building a decision flowchart. Based on this flowchart and the corresponding business data, REVIVE SDK can train a virtual environment model that fully complies with the business logic defined by the decision flowchart. The reward function file defines the method of calculating the reward value of the decision, and REVIVE SDK uses reinforcement learning algorithms to optimize the reward value to obtain the optimal control strategy.
The decision flowchart, training data, and reward function constitute a complete training task input. In the following tutorials and task examples, we will explain the process of preparing data in detail.
The following shows how to quickly train virtual environment models and policy models using the example data provided by REVIVE SDK:
Training commands:
# Train virtual environment and policy models using default parameters
python train.py -df test.npz -cf test.yaml -rf test_reward.py -vm once -pm once --run_id test
# Train virtual environment and policy models using hyperparameter tuning mode
python train.py -df test.npz -cf test.yaml -rf test_reward.py -vm tune -pm tune --run_id test
# Train virtual environment and policy models using a custom parameter file (config.json)
python train.py -df test.npz -cf test.yaml -rf test_reward.py -rcf config.json --run_id test
Example data: https://agit.ai/Polixir/revive/src/branch/master/data
During the training process, REVIVE SDK will automatically create a log folder logs/test
to record training logs and model results. After the training is completed, the results will be saved as env.pkl
and policy.pkl
and stored in the training log folder.