torchruntime 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {torchruntime-1.0.0/torchruntime.egg-info → torchruntime-1.0.1}/PKG-INFO +1 -1
- {torchruntime-1.0.0 → torchruntime-1.0.1}/pyproject.toml +1 -1
- {torchruntime-1.0.0 → torchruntime-1.0.1}/tests/test_installer.py +7 -3
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/installer.py +2 -1
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/tests/test_installer.py +7 -3
- {torchruntime-1.0.0 → torchruntime-1.0.1/torchruntime.egg-info}/PKG-INFO +1 -1
- {torchruntime-1.0.0 → torchruntime-1.0.1}/LICENSE +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/MANIFEST.in +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/README.md +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/setup.cfg +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/setup.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/tests/test_device_db.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/tests/test_device_db_integration.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/tests/test_platform_detection.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/__init__.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/__main__.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/configure.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/consts.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/device_db.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/gpu_pci_ids.db +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/platform_detection.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/tests/test_device_db.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/tests/test_device_db_integration.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime/tests/test_platform_detection.py +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime.egg-info/SOURCES.txt +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime.egg-info/dependency_links.txt +0 -0
- {torchruntime-1.0.0 → torchruntime-1.0.1}/torchruntime.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: torchruntime
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Meant for app developers. A convenient way to install and configure the appropriate version of PyTorch on the user's computer, based on the OS and GPU manufacturer and model number.
|
|
5
5
|
Author-email: cmdr2 <secondary.cmdr2@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/easydiffusion/torchruntime
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "torchruntime"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.1"
|
|
8
8
|
description = "Meant for app developers. A convenient way to install and configure the appropriate version of PyTorch on the user's computer, based on the OS and GPU manufacturer and model number."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.0"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sys
|
|
1
2
|
import pytest
|
|
2
3
|
from unittest.mock import patch
|
|
3
4
|
from torchruntime.installer import get_install_commands, get_pip_commands, run_commands
|
|
@@ -76,8 +77,8 @@ def test_unsupported_platform():
|
|
|
76
77
|
def test_get_pip_commands_valid():
|
|
77
78
|
cmds = [["package1"], ["package2", "--upgrade"]]
|
|
78
79
|
expected = [
|
|
79
|
-
[
|
|
80
|
-
[
|
|
80
|
+
[sys.executable, "-m", "pip", "install", "package1"],
|
|
81
|
+
[sys.executable, "-m", "pip", "install", "package2", "--upgrade"],
|
|
81
82
|
]
|
|
82
83
|
|
|
83
84
|
result = get_pip_commands(cmds)
|
|
@@ -92,7 +93,10 @@ def test_get_pip_commands_none_input():
|
|
|
92
93
|
|
|
93
94
|
# Test suite for run_commands
|
|
94
95
|
def test_run_commands():
|
|
95
|
-
cmds = [
|
|
96
|
+
cmds = [
|
|
97
|
+
[sys.executable, "-m", "pip", "install", "package1"],
|
|
98
|
+
[sys.executable, "-m", "pip", "install", "package2", "--upgrade"],
|
|
99
|
+
]
|
|
96
100
|
|
|
97
101
|
with patch("subprocess.run") as mock_run:
|
|
98
102
|
run_commands(cmds)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import re
|
|
2
|
+
import sys
|
|
2
3
|
import platform
|
|
3
4
|
import subprocess
|
|
4
5
|
|
|
@@ -8,7 +9,7 @@ from .platform_detection import get_torch_platform
|
|
|
8
9
|
|
|
9
10
|
os_name = platform.system()
|
|
10
11
|
|
|
11
|
-
PIP_PREFIX = [
|
|
12
|
+
PIP_PREFIX = [sys.executable, "-m", "pip", "install"]
|
|
12
13
|
CUDA_REGEX = re.compile(r"^cu[\d+]")
|
|
13
14
|
|
|
14
15
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sys
|
|
1
2
|
import pytest
|
|
2
3
|
from unittest.mock import patch
|
|
3
4
|
from torchruntime.installer import get_install_commands, get_pip_commands, run_commands
|
|
@@ -76,8 +77,8 @@ def test_unsupported_platform():
|
|
|
76
77
|
def test_get_pip_commands_valid():
|
|
77
78
|
cmds = [["package1"], ["package2", "--upgrade"]]
|
|
78
79
|
expected = [
|
|
79
|
-
[
|
|
80
|
-
[
|
|
80
|
+
[sys.executable, "-m", "pip", "install", "package1"],
|
|
81
|
+
[sys.executable, "-m", "pip", "install", "package2", "--upgrade"],
|
|
81
82
|
]
|
|
82
83
|
|
|
83
84
|
result = get_pip_commands(cmds)
|
|
@@ -92,7 +93,10 @@ def test_get_pip_commands_none_input():
|
|
|
92
93
|
|
|
93
94
|
# Test suite for run_commands
|
|
94
95
|
def test_run_commands():
|
|
95
|
-
cmds = [
|
|
96
|
+
cmds = [
|
|
97
|
+
[sys.executable, "-m", "pip", "install", "package1"],
|
|
98
|
+
[sys.executable, "-m", "pip", "install", "package2", "--upgrade"],
|
|
99
|
+
]
|
|
96
100
|
|
|
97
101
|
with patch("subprocess.run") as mock_run:
|
|
98
102
|
run_commands(cmds)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: torchruntime
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Meant for app developers. A convenient way to install and configure the appropriate version of PyTorch on the user's computer, based on the OS and GPU manufacturer and model number.
|
|
5
5
|
Author-email: cmdr2 <secondary.cmdr2@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/easydiffusion/torchruntime
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|