torchx-nightly 2025.6.5__py3-none-any.whl → 2025.6.7__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.
Potentially problematic release.
This version of torchx-nightly might be problematic. Click here for more details.
- torchx/specs/finder.py +20 -3
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/METADATA +1 -1
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/RECORD +7 -7
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/LICENSE +0 -0
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/WHEEL +0 -0
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/entry_points.txt +0 -0
- {torchx_nightly-2025.6.5.dist-info → torchx_nightly-2025.6.7.dist-info}/top_level.txt +0 -0
torchx/specs/finder.py
CHANGED
|
@@ -274,12 +274,23 @@ class CustomComponentsFinder(ComponentsFinder):
|
|
|
274
274
|
linter_errors = validate(path, function_name, validators)
|
|
275
275
|
return [linter_error.description for linter_error in linter_errors]
|
|
276
276
|
|
|
277
|
+
def _get_path_to_function_decl(
|
|
278
|
+
self, function: Callable[..., Any] # pyre-ignore[2]
|
|
279
|
+
) -> str:
|
|
280
|
+
"""
|
|
281
|
+
Attempts to return the path to the file where the function is implemented.
|
|
282
|
+
This can be different from the path where the function is looked up, for example if we have:
|
|
283
|
+
my_component defined in some_file.py, imported in other_file.py
|
|
284
|
+
and the component is invoked as other_file.py:my_component
|
|
285
|
+
"""
|
|
286
|
+
path_to_function_decl = inspect.getabsfile(function)
|
|
287
|
+
if path_to_function_decl is None or not os.path.isfile(path_to_function_decl):
|
|
288
|
+
return self._filepath
|
|
289
|
+
return path_to_function_decl
|
|
290
|
+
|
|
277
291
|
def find(
|
|
278
292
|
self, validators: Optional[List[TorchxFunctionValidator]]
|
|
279
293
|
) -> List[_Component]:
|
|
280
|
-
validation_errors = self._get_validation_errors(
|
|
281
|
-
self._filepath, self._function_name, validators
|
|
282
|
-
)
|
|
283
294
|
|
|
284
295
|
file_source = read_conf_file(self._filepath)
|
|
285
296
|
namespace = copy.copy(globals())
|
|
@@ -292,6 +303,12 @@ class CustomComponentsFinder(ComponentsFinder):
|
|
|
292
303
|
)
|
|
293
304
|
app_fn = namespace[self._function_name]
|
|
294
305
|
fn_desc, _ = get_fn_docstring(app_fn)
|
|
306
|
+
|
|
307
|
+
func_path = self._get_path_to_function_decl(app_fn)
|
|
308
|
+
validation_errors = self._get_validation_errors(
|
|
309
|
+
func_path, self._function_name, validators
|
|
310
|
+
)
|
|
311
|
+
|
|
295
312
|
return [
|
|
296
313
|
_Component(
|
|
297
314
|
name=f"{self._filepath}:{self._function_name}",
|
|
@@ -86,7 +86,7 @@ torchx/specs/__init__.py,sha256=c2ALDbqHIhNBhrYxwXXURRwu1Rg5jcwukWF8emEO1Bk,6347
|
|
|
86
86
|
torchx/specs/api.py,sha256=0y1NL43dJHEmEIPP2upseZTrXD3Kiu5EEA2SozRsht4,39703
|
|
87
87
|
torchx/specs/builders.py,sha256=f5Yy8KoL2OgPUiqJRkZ4E6lboq5Srkh5mD17F0EBdeg,10506
|
|
88
88
|
torchx/specs/file_linter.py,sha256=QCwob5STTBuy8RsxaevTI-Dk6R8siDJn81LyaOwazes,12333
|
|
89
|
-
torchx/specs/finder.py,sha256=
|
|
89
|
+
torchx/specs/finder.py,sha256=lMCS1hUR-x7j4sAjfJZnKFeS1RlkFTeJtit4EL_ErIo,18182
|
|
90
90
|
torchx/specs/named_resources_aws.py,sha256=ISjHtifRJqB8u7PeAMiyLyO_S0WCaZiK-CFF3qe6JDU,11415
|
|
91
91
|
torchx/specs/named_resources_generic.py,sha256=Sg4tAdqiiWDrDz2Lj_pnfsjzGIXKTou73wPseh6j55w,2646
|
|
92
92
|
torchx/specs/test/components/__init__.py,sha256=J8qjUOysmcMAek2KFN13mViOXZxTYc5vCrF02t3VuFU,223
|
|
@@ -115,9 +115,9 @@ torchx/workspace/__init__.py,sha256=FqN8AN4VhR1C_SBY10MggQvNZmyanbbuPuE-JCjkyUY,
|
|
|
115
115
|
torchx/workspace/api.py,sha256=PtDkGTC5lX03pRoYpuMz2KCmM1ZOycRP1UknqvNb97Y,6341
|
|
116
116
|
torchx/workspace/dir_workspace.py,sha256=npNW_IjUZm_yS5r-8hrRkH46ndDd9a_eApT64m1S1T4,2268
|
|
117
117
|
torchx/workspace/docker_workspace.py,sha256=PFu2KQNVC-0p2aKJ-W_BKA9ZOmXdCY2ABEkCExp3udQ,10269
|
|
118
|
-
torchx_nightly-2025.6.
|
|
119
|
-
torchx_nightly-2025.6.
|
|
120
|
-
torchx_nightly-2025.6.
|
|
121
|
-
torchx_nightly-2025.6.
|
|
122
|
-
torchx_nightly-2025.6.
|
|
123
|
-
torchx_nightly-2025.6.
|
|
118
|
+
torchx_nightly-2025.6.7.dist-info/LICENSE,sha256=WVHfXhFC0Ia8LTKt_nJVYobdqTJVg_4J3Crrfm2A8KQ,1721
|
|
119
|
+
torchx_nightly-2025.6.7.dist-info/METADATA,sha256=yY2jRBv72-Ax1VrMEz58grLXEslH-C6loPcXAgB2vCk,6119
|
|
120
|
+
torchx_nightly-2025.6.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
121
|
+
torchx_nightly-2025.6.7.dist-info/entry_points.txt,sha256=T328AMXeKI3JZnnxfkEew2ZcMN1oQDtkXjMz7lkV-P4,169
|
|
122
|
+
torchx_nightly-2025.6.7.dist-info/top_level.txt,sha256=pxew3bc2gsiViS0zADs0jb6kC5v8o_Yy_85fhHj_J1A,7
|
|
123
|
+
torchx_nightly-2025.6.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|