Skip to content

Commit cbf5c4c

Browse files
dnanutiIsaevIlya
authored andcommitted
Update Lightning dependencies and examples headers (#186)
1 parent 37d6c41 commit cbf5c4c

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

.github/workflows/python-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262

6363
- name: Install Lightning dependency
6464
run: |
65-
python -m pip install -e "s3torchconnector[lightning]"
65+
python -m pip install -e "s3torchconnector[lightning-tests]"
6666
- name: s3torchconnector lightning unit tests
6767
run: pytest s3torchconnector/tst/unit/lightning --hypothesis-profile ci --hypothesis-show-statistics -c ./
6868

.github/workflows/python-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
9494
- name: Install Lightning dependency
9595
run: |
96-
python -m pip install -e "s3torchconnector[lightning]"
96+
python -m pip install -e "s3torchconnector[lightning-tests]"
9797
- name: s3torchconnector lightning e2e tests
9898
run: |
9999
CI_REGION=${{ matrix.test-run.region }} \

s3torchconnector/pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ e2e = [
4646
]
4747

4848
lightning = [
49-
"lightning >= 2.0",
49+
"lightning >= 2.0"
50+
]
51+
52+
lightning-tests = [
53+
"s3torchconnector[lightning]",
5054
"s3fs"
5155
]
5256

s3torchconnector/tst/e2e/models/lightning_transformer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
"""
2+
Based on: https://lightning.ai/docs/pytorch/stable/common/lightning_module.html
3+
Source: https://github.com/Lightning-AI/pytorch-lightning/blob/master/docs/source-pytorch/common/lightning_module.rst
4+
License: https://github.com/Lightning-AI/pytorch-lightning/blob/master/LICENSE
5+
"""
6+
17
import lightning as L
28
import torch
39

410
from lightning.pytorch.demos import Transformer
511

6-
# Based on https://lightning.ai/docs/pytorch/stable/common/lightning_module.html
7-
812

913
class LightningTransformer(L.LightningModule):
1014
def __init__(self, vocab_size):

s3torchconnector/tst/e2e/models/net.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
"""
2+
Based on: https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html
3+
Source: https://github.com/pytorch/tutorials/blob/main/beginner_source/blitz/neural_networks_tutorial.py
4+
License: https://github.com/pytorch/tutorials/blob/main/LICENSE
5+
"""
6+
17
import torch
28
import torch.nn.functional as F
39
from torch import nn
410

5-
# Based on https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html
6-
711

812
class Net(nn.Module):
913
def __init__(self):

s3torchconnectorclient/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ test-command = [
5353
"CI_STORAGE_CLASS='' CI_REGION=${S3_REGION} CI_BUCKET=${S3_BUCKET} CI_PREFIX=${S3_PREFIX} CI_CUSTOM_ENDPOINT_URL=${S3_CUSTOM_ENDPOINT_URL} pytest {package}/../s3torchconnector/tst/e2e --ignore {package}/../s3torchconnector/tst/e2e/test_e2e_s3_lightning_checkpoint.py",
5454
"CI_STORAGE_CLASS=EXPRESS_ONEZONE CI_REGION=${S3_EXPRESS_REGION} CI_BUCKET=${S3_EXPRESS_BUCKET} CI_PREFIX=${S3_PREFIX} CI_CUSTOM_ENDPOINT_URL='' pytest {package}/python/tst/integration",
5555
"CI_STORAGE_CLASS=EXPRESS_ONEZONE CI_REGION=${S3_EXPRESS_REGION} CI_BUCKET=${S3_EXPRESS_BUCKET} CI_PREFIX=${S3_PREFIX} CI_CUSTOM_ENDPOINT_URL='' pytest {package}/../s3torchconnector/tst/e2e --ignore {package}/../s3torchconnector/tst/e2e/test_e2e_s3_lightning_checkpoint.py",
56-
"python -m pip install -e '{package}/../s3torchconnector[lightning]'",
56+
"python -m pip install -e '{package}/../s3torchconnector[lightning-tests]'",
5757
"pytest {package}/../s3torchconnector/tst/unit/lightning",
5858
"CI_STORAGE_CLASS='' CI_REGION=${S3_REGION} CI_BUCKET=${S3_BUCKET} CI_PREFIX=${S3_PREFIX} CI_CUSTOM_ENDPOINT_URL=${S3_CUSTOM_ENDPOINT_URL} pytest {package}/../s3torchconnector/tst/e2e/test_e2e_s3_lightning_checkpoint.py",
5959
"AWS_DEFAULT_REGION=${S3_EXPRESS_REGION} CI_STORAGE_CLASS=EXPRESS_ONEZONE CI_REGION=${S3_EXPRESS_REGION} CI_BUCKET=${S3_EXPRESS_BUCKET} CI_PREFIX=${S3_PREFIX} CI_CUSTOM_ENDPOINT_URL='' pytest {package}/../s3torchconnector/tst/e2e/test_e2e_s3_lightning_checkpoint.py",

0 commit comments

Comments
 (0)