Skip to content

Commit

Permalink
Switch to new package name lightning_data -> litdata (#19522)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Feb 23, 2024
1 parent f2f3ef5 commit 0f4522c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lightning/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

from lightning_utilities.core.imports import RequirementCache

_LIGHTNING_DATA_AVAILABLE = RequirementCache("lightning_data")
_LITDATA_AVAILABLE = RequirementCache("litdata")
_LIGHTNING_SDK_AVAILABLE = RequirementCache("lightning_sdk")

if _LIGHTNING_DATA_AVAILABLE:
import lightning_data
if _LITDATA_AVAILABLE:
import litdata

# Enable resolution at least for lower data namespace
sys.modules["lightning.data"] = lightning_data
sys.modules["lightning.data"] = litdata

from lightning_data.processing.functions import map, optimize, walk
from lightning_data.streaming.combined import CombinedStreamingDataset
from lightning_data.streaming.dataloader import StreamingDataLoader
from lightning_data.streaming.dataset import StreamingDataset
from litdata.processing.functions import map, optimize, walk
from litdata.streaming.combined import CombinedStreamingDataset
from litdata.streaming.dataloader import StreamingDataLoader
from litdata.streaming.dataset import StreamingDataset

else:
# TODO: Delete all the code when everything is moved to lightning_data
# TODO: Delete all the code when everything is moved to litdata
from lightning.data.processing.functions import map, optimize, walk
from lightning.data.streaming.combined import CombinedStreamingDataset
from lightning.data.streaming.dataloader import StreamingDataLoader
Expand All @@ -34,7 +34,7 @@
"walk",
]

# TODO: Move this to lightning_data
# TODO: Move this to litdata
if _LIGHTNING_SDK_AVAILABLE:
from lightning_sdk import Machine # noqa: F401

Expand Down

0 comments on commit 0f4522c

Please sign in to comment.