robo-lib 1.0.1__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robo_lib/components.py +4 -2
- {robo_lib-1.0.1.dist-info → robo_lib-1.0.2.dist-info}/METADATA +1 -1
- robo_lib-1.0.2.dist-info/RECORD +6 -0
- robo_lib-1.0.1.dist-info/RECORD +0 -6
- {robo_lib-1.0.1.dist-info → robo_lib-1.0.2.dist-info}/WHEEL +0 -0
- {robo_lib-1.0.1.dist-info → robo_lib-1.0.2.dist-info}/licenses/LICENSE +0 -0
robo_lib/components.py
CHANGED
@@ -136,10 +136,12 @@ class TokenizerConstructor:
|
|
136
136
|
'''
|
137
137
|
if max_length is not None:
|
138
138
|
self.tokenizer_type.enable_truncation(max_length=max_length)
|
139
|
-
self.
|
139
|
+
if self.pad_token is not None:
|
140
|
+
self.tokenizer_type.enable_padding(pad_id=self.pad_token, pad_token=self.pad_token_string, length=max_length)
|
140
141
|
out = [row.ids for row in self.tokenizer_type.encode_batch(inp)]
|
141
142
|
self.tokenizer_type.no_truncation()
|
142
|
-
self.
|
143
|
+
if self.pad_token is not None:
|
144
|
+
self.tokenizer_type.enable_padding(pad_id=self.pad_token, pad_token=self.pad_token_string)
|
143
145
|
return out
|
144
146
|
|
145
147
|
def decode(self, inp:list[int]) -> str:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: robo_lib
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.2
|
4
4
|
Summary: A package to create, configure, and train transformer models.
|
5
5
|
Project-URL: Homepage, https://github.com/hamburgerfish/robo_pack
|
6
6
|
Project-URL: Issues, https://github.com/hamburgerfish/robo_pack/issues
|
@@ -0,0 +1,6 @@
|
|
1
|
+
robo_lib/__init__.py,sha256=NnzWHWwpFcSJD_XRMWKKPQFAIrRBFYiCFN0pgUGPygc,968
|
2
|
+
robo_lib/components.py,sha256=eJ6ZU8xvPXy3vFx26C7J_2jSSsMPPoIFk7EDTXZpfOI,43256
|
3
|
+
robo_lib-1.0.2.dist-info/METADATA,sha256=j6aCx5KqUIZmy-j8r2AGafOB450-G0uBbQWdJUeyLKc,9051
|
4
|
+
robo_lib-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
robo_lib-1.0.2.dist-info/licenses/LICENSE,sha256=4XzkkpFqPzH0GH3zxOqRTqc7xUKSEe7dWPOuJYW95ac,1089
|
6
|
+
robo_lib-1.0.2.dist-info/RECORD,,
|
robo_lib-1.0.1.dist-info/RECORD
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
robo_lib/__init__.py,sha256=NnzWHWwpFcSJD_XRMWKKPQFAIrRBFYiCFN0pgUGPygc,968
|
2
|
-
robo_lib/components.py,sha256=mfvdNC77d1k1vmlNwG3ri2MbfmEn3haACAnRf56b_c4,43164
|
3
|
-
robo_lib-1.0.1.dist-info/METADATA,sha256=4CG07VLULgAcGlfNeNXS9Pjzs7SXP5gNf95ddgGbWqc,9051
|
4
|
-
robo_lib-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
robo_lib-1.0.1.dist-info/licenses/LICENSE,sha256=4XzkkpFqPzH0GH3zxOqRTqc7xUKSEe7dWPOuJYW95ac,1089
|
6
|
-
robo_lib-1.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|