facebookresearch / facebookresearch/ReAgent
Customized plan cannot be captured as in the RASP tutorial example
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 529
- PR merge metrics
- No merged PRs in 30d
Description
I'm running the examples in the [RASP tutorial](https://github.com/facebookresearch/ReAgent/blob/master/docs/rasp_tutorial.rst) in an environment built from reagent cpu docker [image](https://hub.docker.com/r/reagent/reagent/tags) in a MAC OS, and I was trying to replicate this (but just replacing the heuristic plan with a new generated plan):
```
python serving/examples/ecommerce/customer_simulator.py heuristic.json
```
I was able to generate an epsilon_greedy_plan.json using the `epsilongreedyranker_decision_plan()` in [example.py](https://github.com/facebookresearch/ReAgent/blob/5f0950b24b3ebb3aab11fa3fe6f7141828fc183a/serving/reagent/serving/config/applications/example/example.py), the `EpsilonGreedyRanker()` in [operator.py](https://github.com/facebookresearch/ReAgent/blob/5f0950b24b3ebb3aab11fa3fe6f7141828fc183a/serving/reagent/serving/config/operators.py), and the `DecisionPlanBuilder()` class in [builder.py](https://github.com/facebookresearch/ReAgent/blob/5f0950b24b3ebb3aab11fa3fe6f7141828fc183a/serving/reagent/serving/config/builder.py):
```
{
"operators": [
{
"name": "EpsilonGreedyRanker_1",
"op_name": "EpsilonGreedyRanker",
"input_dep_map": {
"epsilon": "constant_2",
"values": "constant_3"
}
}
],
"constants": [
{
"name": "constant_2",
"value": {
"double_value": 0.1
}
},
{
"name": "constant_3",
"value": {
"map_double_value": {
"action1": 10.0,
"action2": 20.0
}
}
}
],
"num_actions_to_choose": 1,
"reward_function": "",
"reward_aggregator": [
"max"
]
}
```
This plan is now in the same dir as the heuristic plan but running `python serving/examples/ecommerce/customer_simulator.py epsilon_greedy_plan.json` returned error messages:
```
E1110 21:29:26.775698 6181 DecisionService.cpp:27] Tried to get a config that doesn't exist: epsilon_greedy_plan.json
E1110 21:29:26.775782 6181 Server.cpp:25] GOT ERROR: Tried to get a config that doesn't exist: epsilon_greedy_plan.json
```
It seems the `getPlan()` failed to capture the plan but I'm wondering how to connect customized plans to the server. Is this something related to the `export()` function in the builder as well as in the main file? Thanks!!
Contributor guide
Assessment
This issue has not been assessed yet.