torchbase 0.1.2__tar.gz → 0.1.4__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.
- {torchbase-0.1.2 → torchbase-0.1.4}/PKG-INFO +12 -6
- {torchbase-0.1.2 → torchbase-0.1.4}/README.md +5 -2
- torchbase-0.1.4/pyproject.toml +55 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/session.py +2 -0
- torchbase-0.1.2/pyproject.toml +0 -25
- {torchbase-0.1.2 → torchbase-0.1.4}/LICENSE +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/__init__.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/__init__.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/data.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/logger.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/metrics.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/metrics_instances.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/networks.py +0 -0
- {torchbase-0.1.2 → torchbase-0.1.4}/torchbase/utils/session.py +0 -0
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: torchbase
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A minimalist base for ML projects in PyTorch
|
|
5
|
-
License: Apache-2.0
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Sohrab Ferdowsi
|
|
7
8
|
Author-email: sohrab.ferdowsi@gmail.com
|
|
8
9
|
Requires-Python: >=3.10
|
|
9
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.10
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
16
|
Requires-Dist: datasets
|
|
16
17
|
Requires-Dist: numpy
|
|
17
18
|
Requires-Dist: scikit-learn
|
|
18
19
|
Requires-Dist: tensorboard
|
|
19
20
|
Requires-Dist: torch
|
|
21
|
+
Project-URL: Issues, https://github.com/sssohrab/torchbase/issues
|
|
22
|
+
Project-URL: Repository, https://github.com/sssohrab/torchbase
|
|
20
23
|
Description-Content-Type: text/markdown
|
|
21
24
|
|
|
22
25
|
# `torchbase`
|
|
@@ -403,11 +406,14 @@ any other library mentioned above.
|
|
|
403
406
|
|
|
404
407
|
## Contributing
|
|
405
408
|
|
|
409
|
+
See the [contributor guide](https://github.com/sssohrab/torchbase/blob/main/CONTRIBUTING.md)
|
|
410
|
+
for development setup, the [release guide](https://github.com/sssohrab/torchbase/blob/main/RELEASING.md)
|
|
411
|
+
for publishing, and the [changelog](https://github.com/sssohrab/torchbase/blob/main/CHANGELOG.md)
|
|
412
|
+
for release history.
|
|
413
|
+
|
|
406
414
|
This is an early stage project and welcomes community contributions and improvement proposals. Feel free to:
|
|
407
415
|
|
|
408
416
|
- Open a [GitHub issue](https://github.com/sssohrab/torchbase/issues).
|
|
409
417
|
- Submit a pull request with your proposed changes.
|
|
410
418
|
- Reach out directly to the owner of the project via [email](mailto:sohrab.ferdowsi@gmail.com).
|
|
411
419
|
|
|
412
|
-
|
|
413
|
-
|
|
@@ -382,10 +382,13 @@ any other library mentioned above.
|
|
|
382
382
|
|
|
383
383
|
## Contributing
|
|
384
384
|
|
|
385
|
+
See the [contributor guide](https://github.com/sssohrab/torchbase/blob/main/CONTRIBUTING.md)
|
|
386
|
+
for development setup, the [release guide](https://github.com/sssohrab/torchbase/blob/main/RELEASING.md)
|
|
387
|
+
for publishing, and the [changelog](https://github.com/sssohrab/torchbase/blob/main/CHANGELOG.md)
|
|
388
|
+
for release history.
|
|
389
|
+
|
|
385
390
|
This is an early stage project and welcomes community contributions and improvement proposals. Feel free to:
|
|
386
391
|
|
|
387
392
|
- Open a [GitHub issue](https://github.com/sssohrab/torchbase/issues).
|
|
388
393
|
- Submit a pull request with your proposed changes.
|
|
389
394
|
- Reach out directly to the owner of the project via [email](mailto:sohrab.ferdowsi@gmail.com).
|
|
390
|
-
|
|
391
|
-
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "torchbase"
|
|
3
|
+
version = "0.1.4"
|
|
4
|
+
description = "A minimalist base for ML projects in PyTorch"
|
|
5
|
+
authors = [{ name = "Sohrab Ferdowsi", email = "sohrab.ferdowsi@gmail.com" }]
|
|
6
|
+
license = "Apache-2.0"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.10"
|
|
9
|
+
dependencies = ["torch", "datasets", "tensorboard", "numpy", "scikit-learn"]
|
|
10
|
+
|
|
11
|
+
[project.urls]
|
|
12
|
+
Repository = "https://github.com/sssohrab/torchbase"
|
|
13
|
+
Issues = "https://github.com/sssohrab/torchbase/issues"
|
|
14
|
+
|
|
15
|
+
[dependency-groups]
|
|
16
|
+
dev = ["torchvision", "coverage[toml]>=7.6.10,<8"]
|
|
17
|
+
tooling = ["ruff>=0.11,<1", "twine>=6,<7"]
|
|
18
|
+
|
|
19
|
+
# Keep the existing package layout and backend during the tooling migration.
|
|
20
|
+
[tool.poetry]
|
|
21
|
+
packages = [{ include = "torchbase" }]
|
|
22
|
+
|
|
23
|
+
[build-system]
|
|
24
|
+
requires = ["poetry-core>=2.2,<3"]
|
|
25
|
+
build-backend = "poetry.core.masonry.api"
|
|
26
|
+
|
|
27
|
+
[tool.uv]
|
|
28
|
+
required-version = ">=0.11.7"
|
|
29
|
+
|
|
30
|
+
# Contributor/CI environments use CPU wheels on Linux. This does not change
|
|
31
|
+
# published requirements or the PyTorch installation chosen by pip users.
|
|
32
|
+
[[tool.uv.index]]
|
|
33
|
+
name = "pytorch-cpu"
|
|
34
|
+
url = "https://download.pytorch.org/whl/cpu"
|
|
35
|
+
explicit = true
|
|
36
|
+
|
|
37
|
+
[tool.uv.sources]
|
|
38
|
+
torch = [{ index = "pytorch-cpu", marker = "sys_platform == 'linux'" }]
|
|
39
|
+
torchvision = [{ index = "pytorch-cpu", marker = "sys_platform == 'linux'" }]
|
|
40
|
+
|
|
41
|
+
[tool.ruff]
|
|
42
|
+
target-version = "py310"
|
|
43
|
+
|
|
44
|
+
[tool.ruff.lint]
|
|
45
|
+
# Catch syntax/undefined-name errors without imposing a formatting rewrite.
|
|
46
|
+
select = ["E9", "F63", "F7", "F82"]
|
|
47
|
+
|
|
48
|
+
[tool.coverage.run]
|
|
49
|
+
source = ["torchbase"]
|
|
50
|
+
|
|
51
|
+
[tool.coverage.report]
|
|
52
|
+
fail_under = 70
|
|
53
|
+
|
|
54
|
+
[tool.coverage.paths]
|
|
55
|
+
source = ["torchbase", "*/site-packages/torchbase"]
|
|
@@ -258,6 +258,8 @@ class TrainingBaseSession(ABC):
|
|
|
258
258
|
def _init_network(self) -> torch.nn.Module:
|
|
259
259
|
|
|
260
260
|
network = self.init_network()
|
|
261
|
+
network = network.to(self.device)
|
|
262
|
+
|
|
261
263
|
if not isinstance(network, torch.nn.Module):
|
|
262
264
|
raise TypeError("Failed to instantiate a valid `network`, an instance of `torch.nn.Module`.")
|
|
263
265
|
|
torchbase-0.1.2/pyproject.toml
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
[tool.poetry]
|
|
2
|
-
name = "torchbase"
|
|
3
|
-
version = "0.1.2"
|
|
4
|
-
description = "A minimalist base for ML projects in PyTorch"
|
|
5
|
-
authors = ["Sohrab Ferdowsi <sohrab.ferdowsi@gmail.com>"]
|
|
6
|
-
license = "Apache-2.0"
|
|
7
|
-
readme = "README.md"
|
|
8
|
-
packages = [{ include = "torchbase" }]
|
|
9
|
-
|
|
10
|
-
[tool.poetry.dependencies]
|
|
11
|
-
python = ">=3.10"
|
|
12
|
-
torch = "*"
|
|
13
|
-
datasets = "*"
|
|
14
|
-
tensorboard = "*"
|
|
15
|
-
numpy = "*"
|
|
16
|
-
scikit-learn = "*"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[tool.poetry.group.dev.dependencies]
|
|
20
|
-
torchvision = "*"
|
|
21
|
-
coverage = "^7.6.10"
|
|
22
|
-
|
|
23
|
-
[build-system]
|
|
24
|
-
requires = ["poetry-core"]
|
|
25
|
-
build-backend = "poetry.core.masonry.api"
|
|
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
|