Skip to content

Commit 1839482

Browse files
authored
Merge pull request #88 from kozistr/ci/test
[CI] Reduce `num_iterations` to speed up the testing
2 parents 534a0f4 + 95e5d98 commit 1839482

File tree

8 files changed

+100
-128
lines changed

8 files changed

+100
-128
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ jobs:
2323
uses: actions/cache@v3
2424
with:
2525
path: ~/.cache/pip
26-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
27-
restore-keys: |
28-
${{ runner.os }}-pip-
29-
${{ runner.os }}-
26+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
27+
restore-keys: ${{ runner.os }}-pip-
3028
- name: Install dependencies
3129
run: pip install -r requirements-dev.txt
3230
- name: Check lint

.github/workflows/publish.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ jobs:
3636
uses: actions/cache@v3
3737
with:
3838
path: ~/.cache/pip
39-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
40-
restore-keys: |
41-
${{ runner.os }}-pip-
42-
${{ runner.os }}-
39+
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
40+
restore-keys: ${{ runner.os }}-pip-
4341
- name: Install dependencies
4442
run: |
4543
python3 -m pip install poetry

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ Install
3131

3232
$ pip3 install -U pytorch-optimizer
3333

34+
or
35+
36+
::
37+
38+
$ pip3 install -U --no-deps pytorch-optimizer
39+
3440
Simple Usage
3541
~~~~~~~~~~~~
3642

poetry.lock

Lines changed: 24 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ numpy = [
3737
{ version = "=1.21.1", python = ">=3.7,<3.8"},
3838
{ version = "*", python = ">=3.8"},
3939
]
40-
torch = "^1.10"
40+
torch = { version = "^1.10", source = "torch"}
4141

4242
[tool.poetry.dev-dependencies]
4343
isort = "^5.11.4"
@@ -46,6 +46,11 @@ pylint = "^2.15.9"
4646
pytest = "^7.2.0"
4747
pytest-cov = "^4.0.0"
4848

49+
[[tool.poetry.source]]
50+
name = "torch"
51+
url = "https://download.pytorch.org/whl/cpu"
52+
secondary = true
53+
4954
[build-system]
5055
requires = ["poetry-core>=1.0.0"]
5156
build-backend = "poetry.core.masonry.api"

requirements-dev.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
--extra-index-url https://download.pytorch.org/whl/cpu
2+
13
astroid==2.12.13 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
24
attrs==22.2.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
35
black==22.12.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
@@ -16,17 +18,15 @@ numpy==1.21.1 ; python_full_version >= "3.7.2" and python_version < "3.8"
1618
numpy==1.24.1 ; python_version >= "3.8" and python_full_version < "4.0.0"
1719
packaging==22.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
1820
pathspec==0.10.3 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
19-
platformdirs==2.6.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
21+
platformdirs==2.6.2 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
2022
pluggy==1.0.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
2123
pylint==2.15.9 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
2224
pytest-cov==4.0.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
2325
pytest==7.2.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
24-
setuptools==65.6.3 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0" and platform_system == "Linux"
2526
tomli==2.0.1 ; python_full_version >= "3.7.2" and python_full_version < "3.11.0a7"
2627
tomlkit==0.11.6 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
27-
torch==1.13.1 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
28+
torch==1.13.1+cpu ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
2829
typed-ast==1.5.4 ; python_version < "3.8" and implementation_name == "cpython" and python_full_version >= "3.7.2"
2930
typing-extensions==4.4.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
30-
wheel==0.38.4 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0" and platform_system == "Linux"
3131
wrapt==1.14.1 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
3232
zipp==3.11.0 ; python_full_version >= "3.7.2" and python_version < "3.8"

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
--extra-index-url https://download.pytorch.org/whl/cpu
2+
13
numpy==1.21.1 ; python_full_version >= "3.7.2" and python_version < "3.8"
24
numpy==1.24.1 ; python_version >= "3.8" and python_full_version < "4.0.0"
3-
setuptools==65.6.3 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0" and platform_system == "Linux"
4-
torch==1.13.1 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
5+
torch==1.13.1+cpu ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
56
typing-extensions==4.4.0 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0"
6-
wheel==0.38.4 ; python_full_version >= "3.7.2" and python_full_version < "4.0.0" and platform_system == "Linux"

0 commit comments

Comments
 (0)