Skip to content

NNotepad: Add ability to show additional tensors in the output#311

Merged
Honry merged 1 commit intowebmachinelearning:masterfrom
inexorabletash:nnotepad-multiple-outputs
Mar 25, 2025
Merged

NNotepad: Add ability to show additional tensors in the output#311
Honry merged 1 commit intowebmachinelearning:masterfrom
inexorabletash:nnotepad-multiple-outputs

Conversation

@inexorabletash
Copy link
Copy Markdown
Contributor

Adds output() helper which can be used to list an identifier (or multiple identifiers) that will be shown in the results pane before the result of the final expression or assignment.

A few notes:

  • Ending with an output() is supported, as a convenience.

  • The output() helper takes an identifier, not an expression. In the future this could change, either to taking an expression or showing the identifier name in the results pane.

  • Mixing split() (which returns a list of tensors) and output() is probably a bit confusing, since split already gives you multiple tensors, you're gonna have to pay attention to how many are coming from each. Sorry!

Also fixes a minor issue with the call to asyncInit in js/tests.js - it wasn't awaited, so if the first test case was a test with a call it would fail.

Adds `output()` helper which can be used to list an identifier (or
multiple identifiers) that will be shown in the results pane before
the result of the final expression or assignment.

A few notes:

- Ending with an `output()` is supported, as a convenience.

- The `output()` helper takes an identifier, not an expression. In the
  future this could change, either to taking an expression or showing
  the identifier name in the results pane.

- Mixing `split()` (which returns a list of tensors) and `output()` is
  probably a bit confusing, since split already gives you multiple
  tensors, you're gonna have to pay attention to how many are coming
  from each. Sorry!

Also fixes a minor issue with the call to asyncInit in js/tests.js -
it wasn't awaited, so if the first test case was a test with a call it
would fail.
@inexorabletash
Copy link
Copy Markdown
Contributor Author

@Honry - please take a look?

Feature request from @philloooo

Copy link
Copy Markdown
Collaborator

@Honry Honry 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!

@Honry Honry merged commit c9af26d into webmachinelearning:master Mar 25, 2025
3 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.

2 participants