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.


Fixes: #504
While implementing the runtime type inspector in #409, I come across various type issues that I would like to fix in this standalone PR for easier discussion.
I'm figuring this out on a per-example basis and SpeechT5 is down to 3 errors now:
The
config.behaviortype issue is about a discrepancy between between this type:https://github.com/xenova/transformers.js/blob/768a2e26d7f34746caa2b102f55dbd270c5d6f36/src/tokenizers.js#L1317-L1319
And this Python JSON generator code:
https://github.com/xenova/transformers.js/blob/768a2e26d7f34746caa2b102f55dbd270c5d6f36/scripts/extra/speecht5.py#L40-L47
Should we use "Isolated" or "isolated"? I don't know which one is "right", the only occurance of "isolated" I can find is here:
https://github.com/huggingface/transformers/blob/35551f9a0f66a22de4971b4a51b3c172d3b87f95/src/transformers/convert_slow_tokenizer.py#L633-L639