Skip to content

Conversation

@JonathanColetti
Copy link
Contributor

@JonathanColetti JonathanColetti commented Nov 12, 2025

Description

closes #2189

I added detailed documentation for setup and inference in tensorflow.js along with clear explanations on each design choice

I added versioning pinning in the ONNX for better reproduceability along with an extra comment stating you can renormalize or unnormalize

I added an example project of mine in the export to ONNX-JS documentation. I can remove if unneeded but I thought it would add depth with a real world example

The command in pip install -e .[docs,tests,extra] fails on zsh due to zsh: no matches found: .[docs,tests,extra] thus it was changed to pip install -e '.[docs,tests,extra]'

Motivation and Context

  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (update in the documentation)

Checklist

  • I've read the CONTRIBUTION guide (required)
  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have opened an associated PR on the SB3-Contrib repository (if necessary)
  • I have opened an associated PR on the RL-Zoo3 repository (if necessary)
  • I have reformatted the code using make format (required)
  • I have checked the codestyle using make check-codestyle and make lint (required)
  • I have ensured make pytest and make type both pass. (required)
  • I have checked that the documentation builds using make doc (required)

Note: You can run most of the checks using make commit-checks.

Note: we are using a maximum length of 127 characters per line

------------------------------------

See https://onnxruntime.ai/docs/tutorials/web/build-web-app.html
Full example code: https://github.com/JonathanColetti/CarDodgingGym and demo: https://jonathancoletti.github.io/CarDodgingGym/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the link to the official doc too

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and cool demo =)


The following is a simple example that showcases the full conversion + inference

.. code-block:: python
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just refer to the code above and say that the opset need to be changed

@JonathanColetti
Copy link
Contributor Author

@araffin thanks for the input. I made the changes! let me know if anything is wrong or I misinterpreted something

@araffin araffin changed the title Add tensorflow.js, version pinning and example repo in onnx-js, make contributing.md setup more robust Add tensorflow.js export example Nov 14, 2025
Copy link
Member

@araffin araffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks =)

@araffin araffin merged commit bab847b into DLR-RM:master Nov 14, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tensorflow JS example in documentation along with version pinning, fix in CONTRIBUTING.md, and example project in ONNX-JS

2 participants