Commit Graph
15 Commits
Author SHA1 Message Date
Kaiwen Wang bc11359f69 fix some tests (#363)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/363

mistakenly imported pvc in last diff

Reviewed By: kittipatv

Differential Revision: D25693999

fbshipit-source-id: 3f9060260cc7ec5f9411a74ce7d2d9015f2cb087
2020-12-25 14:56:57 -08:00
Kaiwen Wang b43ceca1fe Replace TableSpec internals with pvc.HiveDataset
Summary:
1. Replace namespace, table and ds in TableSpec with pvc.HiveDataset
2. Whenever TableSpec is initialized, we initialize a HiveDataset and pass it in so that it's possible to designate multiple partitions.
3. For pvc queries, use table_spec.dataset directly for most of the time.
4. Update all related interfaces to comply with this change.

It turns out TableSpec is defined as a very low level data structure and referenced by many files (>30)... I tried my best to update all of them via code search, unit test and integration test. But to be honest I don't have any context about this rl project at all except knowing this is a fblearner flow pipeline. So please let me know if I miss anything. Thanks!

Reviewed By: kittipatv

Differential Revision: D25538742

fbshipit-source-id: 5df4d36e60d5717c3042a9728daafa86e080a9da
2020-12-22 23:25:35 -08:00
Pradeep Kumar Srinivasan 15ec3d92f1 Enable Pyre's source-db buck builder and auto-suppress errors - batch 8.
Reviewed By: grievejia

Differential Revision: D24655770

fbshipit-source-id: 1fec713e37a8edc4ef0a9855f55c52bcf28eb275
2020-11-09 14:56:16 -08:00
generatedunixname89002005307016 f0d6eea3e3 suppress errors in reagent
Differential Revision: D24485132

fbshipit-source-id: 4d5f3ab645a0834127f36dfaae0ff8405dbb049d
2020-10-22 17:07:30 -07:00
Kittipat Virochsiri bfa7a550d4 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:39:36 -07:00
Kittipat Virochsiri 4929ba7150 Run gym tests w/ pytest (#309)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/309

Made the test runable internally

Reviewed By: kaiwenw

Differential Revision: D23279296

fbshipit-source-id: 50e03dbb9ceafac812d4fb5d2ddee08231315ea2
2020-09-01 12:46:55 -07:00
Zhengxing Chen 0d294b11e5 Back out recent refactor
Summary:
Need more tests before landing the refactor diffs: D22702504 (https://github.com/facebookresearch/ReAgent/commit/1b470c489d19c33beab88b8ea2e79843d4d31f28), D23123762 (https://github.com/facebookresearch/ReAgent/commit/76829287265bc39f879f3bc1d946a1374c5e1141), D23124179 (https://github.com/facebookresearch/ReAgent/commit/b28f84aa013be00194508f52498160592cb37e9d), D23219012 (https://github.com/facebookresearch/ReAgent/commit/e404c5772ea4118105c2eb136ca96ad5ca8e01db)

Back out to a version based on D23155753.

Check our team diff history: https://fburl.com/diffs/ppsgazgj

Reviewed By: kittipatv

Differential Revision: D23270626

fbshipit-source-id: 14653066bb3924a987a54650a51241895b321c8e
2020-08-21 15:59:42 -07:00
Jason Gauci 1b470c489d Refactor & Remove Page Handler (#299)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/299

This diff accomplishes several items:
1. Remove PageHandler and consolidate all training functions into one function, using polymorphism to handle model-specific logic
2. Make BatchRunner the sole place where FB vs. OSS context is decided (by choosing FbBatchRunner or OssBatchRunner)
3. Transform ModelManager into a stateless provider.
4. With the exception of model manager, remove all duplicate classes by creating oss & internal versions and using polymorphism, or moving out of workflow/* entirely
5. Replace signals-and-slots API with interfaces
6. Create a DataFetcher class, unifying the APIs to query data on OSS and FB.

Reviewed By: kaiwenw

Differential Revision: D22702504

fbshipit-source-id: 3eb8e93144ca12ac650a4fafc875e29d8ade89e3
2020-08-17 15:14:28 -07:00
Jason Gauci 9b55696849 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:27:16 -07:00
Kaiwen Wang c0e856fc9c remove json.dumps from data generation, Clean up duplicated code, (#294)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/294

Can remove them now because automated create_table

Reviewed By: czxttkl

Differential Revision: D22593792

fbshipit-source-id: 81af2bb373a044c03d03deffe6ecf5c16290cff9
2020-07-21 19:36:23 -07:00
Kaiwen Wang 6187208c4f Add parametric query_data to OSS (#243)
Summary:
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/243

Adds support for Actor policies (i.e. SAC) to OSS query_data.
Clean up tests.

Reviewed By: kittipatv

Differential Revision: D21297790

fbshipit-source-id: 783bd9d7151119d92bad6dd5a4d0b92fe0c4ad42
2020-05-02 08:28:51 -07:00
Kai Wen Wang fcc77e0188 minor fix of preprocessing and query_data (#234)
Summary:
- The value of state_features are scalars, rather than lists.
- minor changes to query_data
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/234

Test Plan: Tox.

Reviewed By: kittipatv

Differential Revision: D21111857

Pulled By: kaiwenw

fbshipit-source-id: 2d690cd3feeb7610e26ae1ffa70add0afc444a77
2020-04-20 14:45:09 -07:00
Kai Wen Wang eae3c8a149 data-fetcher that preprocesses data and stores as Petastorm dataset (#223)
Summary:
Converted data_fetcher.py’s query_data to PySpark and added sparse2dense logic.
Since we’re using Parquet (which shall be loaded with Petastorm), instead of returning HiveDataSetClass, I’m returning Dataset containing url to parquet.
Pull Request resolved: https://github.com/facebookresearch/ReAgent/pull/223

Test Plan:
Imported from GitHub, without a `Test Plan:` line.
Run `tox`.

Reviewed By: kittipatv

Differential Revision: D21036014

Pulled By: kaiwenw

fbshipit-source-id: 46f1cef7731db365c70dce4831b6d7adca39dce1
2020-04-16 17:39:12 -07:00
Kittipat Virochsiri 4efafe9f99 Renaming ml.rl to reagent [pt 1]
Summary:
Code mod by running

```
hg grep -l "from ml.\rl" | xargs sed -i 's/from ml.\rl/from reagent/g'
hg grep -l "import ml.\rl" | xargs sed -i 's/import ml.\rl/import reagent/g'
arc f
```

Added `base_module` properties to buck targets

Then run `buck test ml/rl:` & manually fixed edge cases

Reviewed By: czxttkl

Differential Revision: D20951338

fbshipit-source-id: f13b1ef5aa938faa9f5e499c3c97feb7c913db7b
2020-04-14 09:24:47 -07:00
Kittipat Virochsiri 1d18c2a19f Re-sync with internal repository (#229)
Renamed `ml.rl` to `reagent`
2020-04-14 08:48:30 -07:00