Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC-4199: add TCEs to the combined query page #2838
DOC-4199: add TCEs to the combined query page #2838
Changes from 1 commit
16bbd8d
2d96052
70f3aea
06d758b
ad6c025
11bcec3
314c484
d580925
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will throw an error if
vectorOutput
isundefined
(which seems to be an option since you are using.?
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the change you want me to make here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never used the @xenova/transformers package, but because you've used the
.?
I guess the function returnsundefined
in some cases (?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dunno. I stole that code from another set of examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @leibale point is that the pipeline can seemingly return an undefined and then you would be passing an undefined into Object.values(), which will result in an exception.
Now, if this were just to be a test, that probably wouldn't be a huge problem (as the exception would fail the test), but if this is also suppoesd to be documentation on how to use it, perhaps a check for it being undefined with a throw error if it is, would help (and then wouldn't need the ?, as the if undefined check would restrict it away).
just a thought, could be wrong :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test around vectorOutput and removed the '?' from the assignment as suggested.