[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-07-08 11:05:18 +00:00 committed by Luca Antiga
parent cc457fe5eb
commit cf348673ed
5 changed files with 18 additions and 22 deletions

View File

@ -7,7 +7,7 @@ Brief description of all our automation tools used for boosting development perf
## Unit and Integration Testing
| workflow file | action | accelerator |
| -------------------------------------- | ----------------------------------------------------------------------------------------- | ----------- |
| -------------------------------------- | -------------------------------------------------------------------------- | ----------- |
| .github/workflows/ci-tests-fabric.yml | Run all tests except for accelerator-specific and standalone. | CPU |
| .github/workflows/ci-tests-pytorch.yml | Run all tests except for accelerator-specific and standalone. | CPU |
| .github/workflows/ci-tests-data.yml | Run unit and integration tests with data pipelining. | CPU |

View File

@ -26,7 +26,6 @@ defaults:
shell: bash
jobs:
import-pkg:
runs-on: ${{ matrix.os }}
strategy:
@ -50,4 +49,3 @@ jobs:
- name: Try importing
run: from lightning.${{ matrix.pkg-name }} import *
shell: python

View File

@ -1,14 +1,13 @@
import lightning as L
import torch
import torch.nn.functional as F
from data import RandomTokenDataset
from lightning.fabric.strategies import ModelParallelStrategy
from model import ModelArgs, Transformer
from parallelism import parallelize
from torch.distributed.tensor.parallel import loss_parallel
from torch.utils.data import DataLoader
from data import RandomTokenDataset
def train():
strategy = ModelParallelStrategy(

View File

@ -1,14 +1,13 @@
import lightning as L
import torch
import torch.nn.functional as F
from data import RandomTokenDataset
from lightning.pytorch.strategies import ModelParallelStrategy
from model import ModelArgs, Transformer
from parallelism import parallelize
from torch.distributed.tensor.parallel import loss_parallel
from torch.utils.data import DataLoader
from data import RandomTokenDataset
class Llama3(L.LightningModule):
def __init__(self):

View File

@ -13,12 +13,12 @@ else:
# Enable resolution at least for lower data namespace
sys.modules["lightning.app"] = lightning_app
from lightning_app.core.app import LightningApp # noqa: E402
from lightning_app.core.flow import LightningFlow # noqa: E402
from lightning_app.core.work import LightningWork # noqa: E402
from lightning_app.plugin.plugin import LightningPlugin # noqa: E402
from lightning_app.utilities.packaging.build_config import BuildConfig # noqa: E402
from lightning_app.utilities.packaging.cloud_compute import CloudCompute # noqa: E402
from lightning_app.core.app import LightningApp
from lightning_app.core.flow import LightningFlow
from lightning_app.core.work import LightningWork
from lightning_app.plugin.plugin import LightningPlugin
from lightning_app.utilities.packaging.build_config import BuildConfig
from lightning_app.utilities.packaging.cloud_compute import CloudCompute
if module_available("lightning_app.components.demo"):
from lightning.app.components import demo # noqa: F401