ai-edge-torch-nightly 0.4.0.dev20250331__py3-none-any.whl → 0.4.0.dev20250401__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.
@@ -202,11 +202,15 @@ class ModelLoader:
202
202
  """A best effort method for finding appropriate state loader.
203
203
 
204
204
  Raises:
205
- ValueError: If it fails to find an appropriate loader.
205
+ FileNotFoundError: If the path does not exist.
206
+ ValueError: Path exists but fails to find an appropriate loader.
206
207
 
207
208
  Returns:
208
209
  Callable[[str], Dict[str, torch.Tensor]]: State loader to be used.
209
210
  """
211
+ if not os.path.exists(self._file_name):
212
+ raise FileNotFoundError(f"File or directory not found: {self._file_name}")
213
+
210
214
  if os.path.isdir(self._file_name):
211
215
  if glob.glob(os.path.join(self._file_name, "*.safetensors")):
212
216
  return load_safetensors
ai_edge_torch/version.py CHANGED
@@ -13,4 +13,4 @@
13
13
  # limitations under the License.
14
14
  # ==============================================================================
15
15
 
16
- __version__ = "0.4.0.dev20250331"
16
+ __version__ = "0.4.0.dev20250401"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ai-edge-torch-nightly
3
- Version: 0.4.0.dev20250331
3
+ Version: 0.4.0.dev20250401
4
4
  Summary: Supporting PyTorch models with the Google AI Edge TFLite runtime.
5
5
  Home-page: https://github.com/google-ai-edge/ai-edge-torch
6
6
  Keywords: On-Device ML,AI,Google,TFLite,PyTorch,LLMs,GenAI
@@ -2,7 +2,7 @@ ai_edge_torch/__init__.py,sha256=8sPR_5uXJA4NEE0nIwNdSl-ADOJEoR8hAgYvBQDY70Y,120
2
2
  ai_edge_torch/_config.py,sha256=AiqhbcheF7j_ozIGDLC89k1we95aVgFDa-tR6h7UI0s,2529
3
3
  ai_edge_torch/conftest.py,sha256=r0GTrhMRhlmOGrrkvumHN8hkmyug6WvF60vWq8wRIBI,758
4
4
  ai_edge_torch/model.py,sha256=N-pNpTxzhaFGhWhnSGd70lBzb9VlEhTOq5mddU7bvvI,5542
5
- ai_edge_torch/version.py,sha256=n6t63-ZajgC0tcWwi4U40LTERad0h0oOButBq4PVu4M,706
5
+ ai_edge_torch/version.py,sha256=alLtEtREkR7OYUxXcDYdLAFZ0Ba1BRJ3h2R9GVa6iBE,706
6
6
  ai_edge_torch/_convert/__init__.py,sha256=hHLluseD2R0Hh4W6XZRIXY_dRQeYudjsrKGf6LZz65g,671
7
7
  ai_edge_torch/_convert/conversion.py,sha256=gpXQnifODU-mWxkUZw_3ov1lEYBw1SPVIcqj5k7pTGo,5550
8
8
  ai_edge_torch/_convert/conversion_utils.py,sha256=Sr8qXVcTwc-ZnZmK7yxVrIOOp1S_vNrwzC0zUvLTI2o,2160
@@ -186,7 +186,7 @@ ai_edge_torch/generative/test/test_quantize.py,sha256=bEJMhpQ9bIDUZVBXTW888728Fc
186
186
  ai_edge_torch/generative/test/utils.py,sha256=tF6aCfAGJnc9dmzCnZCEOuKNVimfWOqscv9og0DDLHU,2656
187
187
  ai_edge_torch/generative/utilities/__init__.py,sha256=-_jxnnFnCgnTU4oTm4MnRsvL5lqhomBNdFBbqfmfHPo,720
188
188
  ai_edge_torch/generative/utilities/converter.py,sha256=Ol-CCztmjAaSeRGkUaKxA9-5ihATYuLS5kwZo1hpA-A,9577
189
- ai_edge_torch/generative/utilities/loader.py,sha256=KmbjlKpSJEYaYCy5gxOhiaFj6aVAniaBl-kALv_qsGs,13546
189
+ ai_edge_torch/generative/utilities/loader.py,sha256=7p__m2JryWphGlYOuRxdoT4id4_tWJEVOV7y2X4H-Ak,13737
190
190
  ai_edge_torch/generative/utilities/model_builder.py,sha256=eY3qAcBhupIn955YnWuzUi9hoWYvl4ntRWA6PBudzMo,6888
191
191
  ai_edge_torch/generative/utilities/moonshine_loader.py,sha256=_RpFabSqtGH5PHiP3_1f6QfO14qMADUxr_HGRlVDFB0,4891
192
192
  ai_edge_torch/generative/utilities/stable_diffusion_loader.py,sha256=dqPD9qRXEWtU3ombslOC-BE2l_dMwHoCNu7NsIJhsso,36158
@@ -242,8 +242,8 @@ ai_edge_torch/testing/__init__.py,sha256=_yGgvnBZWb7T3IN3mc4x1sS4vM96HZwM8pwIcPG
242
242
  ai_edge_torch/testing/export.py,sha256=dguMa-aEi-WDPnmGBUs2IPdEmt2IVmHOELH19uiJ1uU,3014
243
243
  ai_edge_torch/testing/model_coverage/__init__.py,sha256=5P8J6Zk5YYtDvTBucFvB9NGSRI7Gw_24WnrbhXgycEE,765
244
244
  ai_edge_torch/testing/model_coverage/model_coverage.py,sha256=UPB448aMDUyC0HNYVqio2rcJPnDN0tBQMP08J6vPYew,4718
245
- ai_edge_torch_nightly-0.4.0.dev20250331.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
246
- ai_edge_torch_nightly-0.4.0.dev20250331.dist-info/METADATA,sha256=rLjK4T1BNhrLkyWhYs1VM2yFinL94LN3xs0Xu3cTtOU,1966
247
- ai_edge_torch_nightly-0.4.0.dev20250331.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
248
- ai_edge_torch_nightly-0.4.0.dev20250331.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
249
- ai_edge_torch_nightly-0.4.0.dev20250331.dist-info/RECORD,,
245
+ ai_edge_torch_nightly-0.4.0.dev20250401.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
246
+ ai_edge_torch_nightly-0.4.0.dev20250401.dist-info/METADATA,sha256=DiDVH9ci6trdmfoXY8vGF1P5g658z6tB9ijInpoCHlQ,1966
247
+ ai_edge_torch_nightly-0.4.0.dev20250401.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
248
+ ai_edge_torch_nightly-0.4.0.dev20250401.dist-info/top_level.txt,sha256=5KXRaF2hwkApYxf7Y8y_tVb9aulGTlbOoNdbx1aKRkE,14
249
+ ai_edge_torch_nightly-0.4.0.dev20250401.dist-info/RECORD,,