Skip to content

Add training js wrapper (#998) - #998

Open
jlee303 wants to merge 2 commits into
facebook:devfrom
jlee303:export-D118390186
Open

Add training js wrapper (#998)#998
jlee303 wants to merge 2 commits into
facebook:devfrom
jlee303:export-D118390186

Conversation

@jlee303

@jlee303 jlee303 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Added javascript wrapper for training functionalities
  • Added js TrainOptions that mirrors openzl_wasm_TrainOptions
  • Added js side test cases to verify training can roundtrip and handles input validation

Differential Revision: D118390186

@meta-cla meta-cla Bot added the cla signed label Sep 8, 2026
@meta-codesync

meta-codesync Bot commented Sep 8, 2026

Copy link
Copy Markdown

@jlee303 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118390186.

@meta-codesync meta-codesync Bot changed the title Add training js wrapper Add training js wrapper (#998) Sep 8, 2026
jlee303 added a commit to jlee303/openzl-1 that referenced this pull request Sep 8, 2026
Summary:

- Added javascript wrapper for training functionalities
- Added js `TrainOptions` that mirrors `openzl_wasm_TrainOptions`
- Added js side test cases to verify training can roundtrip and handles input validation

Differential Revision: D118390186
jlee303 added a commit to jlee303/openzl-1 that referenced this pull request Sep 8, 2026
Summary:

- Added javascript wrapper for training functionalities
- Added js `TrainOptions` that mirrors `openzl_wasm_TrainOptions`
- Added js side test cases to verify training can roundtrip and handles input validation

Differential Revision: D118390186
Summary:

- Add `openzl_wasm_train()`. Trains a serialized compressor on a sample and
  returns a new serialized compressor.
  - Added train options in wasm that allow users to train with pareto frontier
- Make ml selector a optional dependency in trainer
  use it in wasm.
- Update CMakeLists.txt
  - Link tools_training and custom_parsers into openzl_wasm.
  - Add `-fexceptions` and `-pthread` for Emscripten
  - Small fix - drop unused ml_selector dep from custom parsers

Differential Revision: D117931036
Summary:

- Added javascript wrapper for training functionalities
- Added js `TrainOptions` that mirrors `openzl_wasm_TrainOptions`
- Added js side test cases to verify training can roundtrip and handles input validation

Differential Revision: D118390186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant