-
-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 Bug report
The CLI seems to not be able to handle torch.dtype
arguments; pretty important for torchvision ToDtype transform.
To reproduce
Using the CLI:
# main.py
import torch
from jsonargparse import CLI
def interface(dtype: torch.dtype) -> None:
print(f"dtype: {dtype} ({type(dtype)})")
CLI(interface)
Run with:
python3 main.py torch.float32
Expected behaviour:
The above to print:
dtype: torch.float32 (<class 'torch.dtype'>)
Environment
- jsonargparse version (e.g., 4.8.0):
- Python version (e.g., 3.9):
- How jsonargparse was installed (e.g.
pip install jsonargparse[all]
): - OS (e.g., Linux):
mauvilsa
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working