robo-lib 1.0.1__tar.gz → 1.0.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: robo_lib
3
- Version: 1.0.1
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "robo_lib"
7
- version = "1.0.1"
7
+ version = "1.0.2"
8
8
  authors = [
9
9
  { name="Erik Papp", email="erik3papp@gmail.com" },
10
10
  ]
@@ -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.tokenizer_type.enable_padding(pad_id=self.pad_token, pad_token=self.pad_token_string, length=max_length)
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.tokenizer_type.enable_padding(pad_id=self.pad_token, pad_token=self.pad_token_string)
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:
File without changes
File without changes
File without changes
File without changes
File without changes