File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 1
- import sys , os
1
+ import os , sys
2
2
3
3
import torcharrow as ta
4
4
import torcharrow .pytorch as tap
8
8
from torchtext ._download_hooks import load_state_dict_from_url
9
9
from torchtext .datasets import SST2
10
10
11
- sys .path .append (os .path .join (os .path .dirname (os .path .realpath (__file__ )), "../examples" ))
12
- from data_pipeline .roberta_dataframe import init_ta_gpt2bpe_encoder , init_ta_gpt2bpe_vocab
11
+ sys .path .append (
12
+ os .path .join (os .path .dirname (os .path .realpath (__file__ )), "../examples" )
13
+ )
14
+ from data_pipeline .roberta_dataframe import (
15
+ init_ta_gpt2bpe_encoder ,
16
+ init_ta_gpt2bpe_vocab ,
17
+ )
13
18
14
19
15
20
def run_torchtext_ops ():
@@ -82,6 +87,10 @@ def run_torcharrow_ops():
82
87
data_frame .to_tensor ({"token_ids" : tap .PadSequence (padding_value = 1 )})
83
88
84
89
85
- if __name__ == "__main__" :
90
+ def main () -> None :
86
91
run_torchtext_ops ()
87
92
run_torcharrow_ops ()
93
+
94
+
95
+ if __name__ == "__main__" :
96
+ main () # pragma: no cover
You can’t perform that action at this time.
0 commit comments