Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
check torch.utils.collect_env.get_pip_packages return values
as they could return `None` instead of `str`

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
  • Loading branch information
crcrpar committed May 23, 2025
commit 561e707b99aecc85247eca712988634c7aac631a
12 changes: 10 additions & 2 deletions thunder/dynamo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,17 @@ def get_env() -> tuple[str, str]:
torch_env += f" {i}: {torch.cuda.get_device_name(i)}\n"
torch_env += f"CUDA version: {torch.version.cuda}\n"
_, packages = get_pip_packages(run)
torch_env += packages
if packages is not None:
torch_env += packages
_, thunder_packages = get_pip_packages(run, {"lightning-thunder", "nvfuser"})
return torch_env, thunder_packages
return (
torch_env,
(
thunder_packages
if thunder_packages is not None
else "pip list failed. Might be related to https://github.com/pytorch/pytorch/issues/144615"
),
)


def thunder_options_to_str(thunder_options: dict) -> str:
Expand Down
Loading