We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ebc435 commit 878562bCopy full SHA for 878562b
src/transformers/testing_utils.py
@@ -3005,6 +3005,8 @@ def backend_device_count(device: str):
3005
3006
# Try to strip extension for later import – also verifies we are importing a
3007
# python file.
3008
+ device_spec_dir, _ = os.path.split(os.path.realpath(device_spec_path))
3009
+ sys.path.append(device_spec_dir)
3010
try:
3011
import_name = device_spec_path[: device_spec_path.index(".py")]
3012
except ValueError as e:
0 commit comments