Skip to content

Commit d0bd8fb

Browse files
authored
Merge branch 'main' into fix-parallel-streaming-dset-resume-with-load-state
2 parents 19244b0 + dd96272 commit d0bd8fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+545
-493
lines changed

.github/benchmark/benchmark.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import argparse
44
from dataclasses import dataclass
5-
from typing import Optional
65

76
from lightning_sdk import Machine, Studio
87

@@ -19,8 +18,8 @@ class BenchmarkArgs:
1918

2019
pr_number: int
2120
branch: str
22-
org: Optional[str]
23-
user: Optional[str]
21+
org: str | None
22+
user: str | None
2423
teamspace: str
2524
machine: Machine
2625
make_args: str
@@ -75,7 +74,7 @@ def __init__(self, config: BenchmarkArgs):
7574
self.org = config.org
7675
self.machine = config.machine
7776
self.make_args = config.make_args
78-
self.studio: Optional[Studio] = None
77+
self.studio: Studio | None = None
7978

8079
def run(self) -> None:
8180
"""Run the LitData benchmark."""

.github/workflows/ci-benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
)
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727
- name: Extract make args
2828
id: extract
2929
uses: actions/github-script@v8

.github/workflows/ci-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
UV_TORCH_BACKEND: "cpu"
3131

3232
steps:
33-
- uses: actions/checkout@v5
33+
- uses: actions/checkout@v6
3434
- name: Install uv and setup python ${{ matrix.python-version }}
3535
uses: astral-sh/setup-uv@v7
3636
with:

.github/workflows/cleanup-caches.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out code
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313

1414
- name: Cleanup
1515
run: |

.github/workflows/docs-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
if: github.event_name != 'pull_request'
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v5 # deploy needs git credentials
22+
- uses: actions/checkout@v6 # deploy needs git credentials
2323
- name: Download prepared docs
24-
uses: actions/download-artifact@v6
24+
uses: actions/download-artifact@v7
2525
with:
2626
name: docs-html-${{ github.sha }}
2727
path: docs/build/html
2828

2929
- name: Deploy 🚀
30-
uses: JamesIves/github-pages-deploy-action@v4.7.4
30+
uses: JamesIves/github-pages-deploy-action@v4.7.6
3131
if: ${{ github.event_name == 'push' }}
3232
with:
3333
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-22.04
1919

2020
steps:
21-
- uses: actions/checkout@v5
21+
- uses: actions/checkout@v6
2222
- uses: actions/setup-python@v6
2323
with:
2424
python-version: "3.10"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ repos:
5555
#args: ["--write-changes"] # uncomment if you want to get automatic fixing
5656

5757
- repo: https://github.com/astral-sh/ruff-pre-commit
58-
rev: v0.13.3
58+
rev: v0.14.10
5959
hooks:
6060
- id: ruff
6161
args: ["--fix"]
@@ -85,7 +85,7 @@ repos:
8585
args: ["--print-width=120"]
8686

8787
- repo: https://github.com/tox-dev/pyproject-fmt
88-
rev: v2.7.0
88+
rev: v2.11.1
8989
hooks:
9090
- id: pyproject-fmt
9191
additional_dependencies: [tox]

benchmarks/litdata/optimize_imagenet.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import os
1111
import time
1212
from functools import lru_cache, partial
13-
from typing import Union
1413

1514
import numpy as np
1615
import requests
@@ -126,7 +125,7 @@ def main():
126125
seed_everything(args.seed)
127126

128127
# Handle resize_size: if two ints are given, treat as tuple, else int or None
129-
resize_size: Union[int, tuple[int, int], None] = None
128+
resize_size: int | tuple[int, int] | None = None
130129
if args.resize_size is not None:
131130
if isinstance(args.resize_size, list):
132131
if len(args.resize_size) == 1:

docs/source/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ def _convert_markdown(path_in: str, path_out: str) -> None:
175175
"logo_only": False,
176176
}
177177

178+
html_context = {
179+
"style": "pytorch",
180+
}
181+
178182
html_favicon = "_static/images/icon.svg"
179183

180184
# Add any paths that contain custom static files (such as style sheets) here,

examples/multi_modal/dataloader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import logging
44
import os
5-
from typing import Any, Union
5+
from typing import Any
66

77
import joblib
88
import lightning as pl
@@ -44,7 +44,7 @@ def load_tokenizer(self):
4444
class DocumentClassificationDataset(StreamingDataset):
4545
"""Streaming dataset class."""
4646

47-
def __init__(self, input_dir: Union[str, Any], hyperparameters: Union[dict, Any] = None) -> None:
47+
def __init__(self, input_dir: str | Any, hyperparameters: dict | Any = None) -> None:
4848
super().__init__(input_dir, shuffle=True, max_cache_size=hyperparameters["max_cache_size"])
4949
self.hyperparameters = hyperparameters
5050
self.image_transform = transforms.Compose(

0 commit comments

Comments
 (0)