11 Commits

Author SHA1 Message Date
Bowie Chen 8c2d4a2de8 apply Black 25.11.0 style in fbcode (72/92)
Summary:
Formats the covered files with pyfmt.

paintitblack

Reviewed By: itamaro

Differential Revision: D90476322

fbshipit-source-id: e689aa40511799087010490a2ebe5260d41130c8
2026-01-12 02:54:36 -08:00
Roel Bertens 6b3ecdc9d4 Four fixes for RASP Tutorial (#458)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/458

When trying to follow the [tutorial](https://reagent.ai/rasp_tutorial.html) there are a few things that need fixing:

1. When running the script serving/scripts/rasp_to_model.py I came across this error

```
python serving/scripts/rasp_to_model.py /tmp/rasp_logging/log.txt /tmp/input_df.pkl

Traceback (most recent call last):
  File "serving/scripts/rasp_to_model.py", line 13, in <module>
    logger.setLevel(logging.info)
  File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 1353, in setLevel
    self.level = _checkLevel(level)
  File "/usr/local/anaconda3/envs/reagent/lib/python3.7/logging/__init__.py", line 195, in _checkLevel
    raise TypeError("Level not an integer or a valid string: %r" % level)
TypeError: Level not an integer or a valid string: <function info at 0x7fb8000d73b0>
```

Luckily it is an easy fix to pass an actual loglevel.

2. This config file probably is outdated: serving/examples/ecommerce/training/contextual_bandit.yaml
- changed indentation level
- changed key name

3. There is an __init__.py file missing in the gym tests therefore leading to an error

4. The path to the SPARK_JAR was not resolving correctly.

Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/391

Test Plan:
Imported from GitHub, without a `Test Plan:` line.
...but without running open source tests.

Reviewed By: czxttkl

Differential Revision: D27842451

Pulled By: MisterTea

fbshipit-source-id: 2175296c6b60db4dc4b22804a74c2259b14fee7e
2021-04-21 09:43:49 -07:00
Kittipat Virochsiri 99f296e1b0 Reverting D22987434 (#317)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/317

Keeping the sanity of OSS API. Merging internal and external classes together means a number of dead options in OSS.

Reviewed By: badrinarayan, kaiwenw

Differential Revision: D23916521

fbshipit-source-id: ad111dabfc1fd354c776a46e765d9ae2c826e292
2020-09-24 18:38:01 -07:00
Alex Nikulkov 68501baf1a Add missing __init__.py files to ReAgent (#312)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/312

The missing `__init__.py` files were preventing proper import from submodules. I added them to all folders which had `*.py` files in them or in subfolders. I also removed one `__init__.py` file from a folder which had no `.py` files.

Reviewed By: kaiwenw

Differential Revision: D23256716

fbshipit-source-id: d94e67e4b2bfe45c7022f63b1dc0f153d98df2e8
2020-09-08 09:35:47 -07:00
Jason Gauci 5737ea647f Merge workflow types (#307)
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/307

Reviewed By: kaiwenw

Differential Revision: D22987434

fbshipit-source-id: 4b5d7ec943d8b8ff4a14843b90504031fd0d0a2c
2020-08-11 09:26:21 -07:00
Kaiwen Wang 20f3d33382 Add registry for Optimizers and LR Scheduler (#259)
Summary:
Make all the optimizers and schedulers in torch.optim available for use. (except CyclicLR, which has a Callable field `scale_fn` that's unsupported by FBL)
Convert DiscreteDQN and QRDQN to trainers to use this new format.
After this diff, OptimizerParameters would be deprecated. Instead, you should specify optimizer directly via the registry.

Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/259

Reviewed By: badrinarayan

Differential Revision: D21470948

fbshipit-source-id: 793222adbfebb87b064dbe7768bbbea89b2129dd
2020-05-28 17:54:45 -07:00
Kaiwen Wang b227a7efe0 Update CB RASP tutorial (#270)
Summary:
Updated CB RASP tutorial to use new OSS workflow.
Introduce FileSystemPublisher, a key-value database with tinydb, an OSS version of predictor. This way, after training the path to torchscript can be uploaded, and during evaluation it can be read.

Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/270

Reviewed By: MisterTea

Differential Revision: D21689872

fbshipit-source-id: e8d510fe895dcb33d41464e026af842e31366f87
2020-05-27 22:17:21 -07:00
Zhengxing Chen 8855b16cd7 Default field values are missing when creating objects from jsons
Summary: Default field values of Objects are missing if creating Objects from Jsons. The simpliest way is to add default values in json files.

Reviewed By: kittipatv

Differential Revision: D19874074

fbshipit-source-id: 7df5519f882e979d06d1bd04babf5e4847f1837c
2020-02-13 10:41:04 -08:00
Jason Gauci f3a0c30321 Rasp bag of fixes
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/165

Reviewed By: ppuliu

Differential Revision: D17933739

Pulled By: MisterTea

fbshipit-source-id: 3dcd8b10cc4b8b9a62e9889278475c1f306fd4a0
2019-10-15 17:51:27 -07:00
Jason Gauci 604ced6b2a Ecom pytorch fixes
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/161

Reviewed By: kittipatv

Differential Revision: D17880151

Pulled By: MisterTea

fbshipit-source-id: 455679f7abb004ae900509589de7fbde688e41f8
2019-10-11 17:03:48 -07:00
Jason Gauci 41b871e494 Ecom example
Summary: Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/160

Reviewed By: kittipatv, ppuliu

Differential Revision: D17850168

Pulled By: MisterTea

fbshipit-source-id: 50634faefe7cccb3d8ff5e9d66621d78c2236348
2019-10-11 09:17:54 -07:00