Skip to content

Commit

Permalink
fix: WASM versioned docs and 0.0.4 release (VowpalWabbit#4598)
Browse files Browse the repository at this point in the history
  • Loading branch information
olgavrou authored May 30, 2023
1 parent dd36d14 commit bc27595
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
3 changes: 2 additions & 1 deletion utl/version_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def debug_print(msg):
sys.exit(1)

git_describe = subprocess.check_output(
["git", "describe", "--tags", "--first-parent", "--long"], text=True
["git", "describe", "--tags", "--first-parent", "--long", "--exclude", "wasm_v*"],
text=True,
).strip()
debug_print("Output of 'git describe' is: " + git_describe)

Expand Down
13 changes: 9 additions & 4 deletions wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

Javascript bindings for [VowpalWabbit](https://vowpalwabbit.org/)

| npmjs version | Vowpal Wabbit version | Vowpal Wabbit tag |
|----------|----------|----------|
| 0.0.3 | 9.8.0 | wasm_v0.0.3 |
| 0.0.4 | 9.8.0 | wasm_v0.0.4 |

## Documentation

[API documentation](documentation.md)
[API documentation](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md)

## Examples and How-To

### How-To include the dependency and initialize a Contextual Bandit ADF model

Full API reference [here](documentation.md#CbWorkspace)
Full API reference [here](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#CbWorkspace)

Require returns a promise because we need to wait for the WASM module to be initialized before including and using the VowpalWabbit JS code

Expand Down Expand Up @@ -177,7 +182,7 @@ There is also the option of stringifying an example for user-handled logging:
let cbAsString = CBExampleToString(example);
```

Synchronous logging options are also available [see API documentation](documentation.md#VWExampleLogger)
Synchronous logging options are also available [see API documentation](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#VWExampleLogger)

### How-To train a model with data from a file

Expand Down Expand Up @@ -226,7 +231,7 @@ catch (e)

### How-To use a generic VW model (non Contextual Bandit specific functionality)

Full API reference [here](documentation.md#Workspace)
Full API reference [here](https://github.com/VowpalWabbit/vowpal_wabbit/blob/wasm_v0.0.4/wasm/documentation.md#Workspace)

#### Simple regression example

Expand Down
11 changes: 10 additions & 1 deletion wasm/developer_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ npm test
### Build docs
``` sh
npm run docs
```
```

### Release on npm

1. Update the version in package.json
2. Change all version references in README.md (relative links will be broken until merged to master and the tag is cut)
3. Update the table in README.md to point to latest VW version and tag
4. Commit changes to master
5. Tag the release as `wasm_v.major.minor.patch`
6. Publish to npm `npm publish --access public` (you need to sign into your npm account first and have access to the vowpalwabbit organisation)
2 changes: 1 addition & 1 deletion wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vowpalwabbit/vowpalwabbit",
"version": "0.0.3",
"version": "0.0.4",
"description": "wasm bindings for vowpal wabbit",
"exports": {
"require": "./dist/vw.js"
Expand Down

0 comments on commit bc27595

Please sign in to comment.