Skip to content

Commit

Permalink
feat(inline): disable load_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
Caceresenzo committed Oct 25, 2024
1 parent 0a68b08 commit ce87a12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crunch/inline.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def _competition(self):
return competition

def load_data(self, **kwargs) -> typing.Tuple[LoadedData, LoadedData, LoadedData]:
if self._competition.format == api.CompetitionFormat.SPATIAL:
logging.error(f"Please follow the competition instructions to load the data.")
return None, None, None

if self._competition.format == api.CompetitionFormat.STREAM:
logging.error(f"Please call `.load_streams()` instead.")
return None, None, None
Expand Down Expand Up @@ -64,6 +68,10 @@ def load_data(self, **kwargs) -> typing.Tuple[LoadedData, LoadedData, LoadedData
return x_train, y_train, x_test

def load_streams(self, **kwargs) -> typing.Tuple[Streams, Streams]:
if self._competition.format == api.CompetitionFormat.SPATIAL:
logging.error(f"Please follow the competition instructions to load the data.")
return None, None

if self._competition.format != api.CompetitionFormat.STREAM:
logging.error(f"Please call `.load_data()` instead.")
return None, None
Expand Down

0 comments on commit ce87a12

Please sign in to comment.