mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00

## Summary Allows, e.g.: ```python import os os.environ["WORLD_SIZE"] = "1" os.putenv("CUDA_VISIBLE_DEVICES", "4") import torch ``` For now, this is only allowed in preview. Closes https://github.com/astral-sh/ruff/issues/10059
7 lines
124 B
Python
7 lines
124 B
Python
import os
|
|
|
|
os.environ["WORLD_SIZE"] = "1"
|
|
os.putenv("CUDA_VISIBLE_DEVICES", "4")
|
|
del os.environ["WORLD_SIZE"]
|
|
|
|
import torch
|