Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 11, 2024
1 parent 897caab commit 338a6b2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/litdata/processing/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
from typing import Any, Dict, List, Optional, Tuple, TypeVar, Union
from urllib import parse

import boto3
import botocore
import numpy as np
import torch

Expand All @@ -51,8 +53,6 @@
from litdata.utilities.broadcast import broadcast_object
from litdata.utilities.dataset_utilities import load_index_file
from litdata.utilities.packing import _pack_greedily
import boto3
import botocore

logger = logging.Logger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion src/litdata/processing/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import torch

from litdata.constants import _INDEX_FILENAME, _IS_IN_STUDIO, _TQDM_AVAILABLE
from litdata.constants import _INDEX_FILENAME, _IS_IN_STUDIO
from litdata.processing.data_processor import DataChunkRecipe, DataProcessor, DataTransformRecipe
from litdata.processing.readers import BaseReader
from litdata.processing.utilities import (
Expand Down
6 changes: 3 additions & 3 deletions src/litdata/processing/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from urllib import parse

from litdata.constants import _INDEX_FILENAME, _IS_IN_STUDIO
from litdata.streaming.cache import Dir

import boto3
import botocore

from litdata.constants import _INDEX_FILENAME, _IS_IN_STUDIO
from litdata.streaming.cache import Dir


def _create_dataset(
input_dir: Optional[str],
Expand Down
4 changes: 2 additions & 2 deletions src/litdata/streaming/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
from time import time
from typing import Any, Optional

from litdata.constants import _IS_IN_STUDIO

import boto3
import botocore
from botocore.credentials import InstanceMetadataProvider
from botocore.utils import InstanceMetadataFetcher

from litdata.constants import _IS_IN_STUDIO


class S3Client:
# TODO: Generalize to support more cloud providers.
Expand Down
6 changes: 3 additions & 3 deletions src/litdata/streaming/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
from dataclasses import dataclass
from pathlib import Path
from time import sleep
from typing import Any, Literal, Optional, Union, TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Literal, Optional, Union
from urllib import parse

from litdata.constants import _LIGHTNING_SDK_AVAILABLE

import boto3
import botocore

from litdata.constants import _LIGHTNING_SDK_AVAILABLE

if TYPE_CHECKING:
from lightning_sdk import Machine

Expand Down
2 changes: 1 addition & 1 deletion src/litdata/streaming/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from abc import ABC, abstractmethod
from collections import OrderedDict
from copy import deepcopy
from typing import Any, Dict, Optional, Tuple, Union, TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union

import numpy as np
import torch
Expand Down

0 comments on commit 338a6b2

Please sign in to comment.