Skip to content

Commit c7686a9

Browse files
larryliu0820facebook-github-bot
authored andcommitted
Use dependency injection for runner (#53)
Summary: X-link: pytorch/executorch#10326 Pass in runner components, move most of the instantiation logic from `load()` to a new static API `create()`. This adds testability to runner components. Differential Revision: D73165546
1 parent 1e2c6f7 commit c7686a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/pytorch/tokenizers/tokenizer.h

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class Tokenizer {
5656
return eos_tok_;
5757
}
5858

59+
virtual bool is_initialized() const {
60+
return initialized_;
61+
}
62+
5963
protected:
6064
bool initialized_ = false;
6165
int32_t vocab_size_ = 0;

0 commit comments

Comments
 (0)