You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
custom components using binop instead of Optional result in validation error.
custom schedulers work as intended as there is no validation
Module (check all that applies):
[x ] torchx.spec
torchx.component
torchx.apps
torchx.runtime
torchx.cli
torchx.schedulers
torchx.pipelines
torchx.aws
torchx.examples
other
torchx.specs.file_linter
To Reproduce
Steps to reproduce the behavior:
with python 3.10+ create and register any custom component, and use binopt instead of typing.Optional
example client: Any | None = None, instead of client: Optional[Any] = None
File "lib/python3.10/site-packages/torchx/specs/file_linter.py", line 144, in _validate_arg_def
if complex_type_def.value.id == "Optional":
AttributeError: 'BinOp' object has no attribute 'value'
Expected behavior
have an edge case for 3.10 where this does not cause component validation to fail
Environment
torchx version (e.g. 0.1.0rc1): 0.6.0
Python version: 3.10
OS (e.g., Linux):
How you installed torchx (conda, pip, source, docker):
🐛 Bug
custom components using binop instead of Optional result in validation error.
custom schedulers work as intended as there is no validation
Module (check all that applies):
torchx.spec
torchx.component
torchx.apps
torchx.runtime
torchx.cli
torchx.schedulers
torchx.pipelines
torchx.aws
torchx.examples
other
torchx.specs.file_linter
To Reproduce
Steps to reproduce the behavior:
Any | None = None
, instead ofclient: Optional[Any] = None
Expected behavior
have an edge case for 3.10 where this does not cause component validation to fail
Environment
conda
,pip
, source,docker
):Additional context
The text was updated successfully, but these errors were encountered: