Skip to content

Commit

Permalink
fix a bug in the definition of source data shape (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
WinstonLiyt authored Sep 25, 2024
1 parent 3009889 commit d902220
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 77 deletions.

This file was deleted.

4 changes: 3 additions & 1 deletion rdagent/scenarios/kaggle/experiment/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def __init__(self, competition: str) -> None:
super().__init__()
self.competition = competition
self.competition_descriptions = crawl_descriptions(competition)
self.input_shape = None
self._source_data = self.source_data

self.competition_type = None
Expand Down Expand Up @@ -121,6 +122,7 @@ def source_data(self) -> str:
buffer = io.StringIO()
X_valid.info(verbose=True, buf=buffer, show_counts=True)
data_info = buffer.getvalue()
self.input_shape = X_valid.shape
return data_info

preprocess_experiment = KGFactorExperiment([])
Expand All @@ -141,7 +143,7 @@ def source_data(self) -> str:
pickle.dump(X_test, open(data_folder / "X_test.pkl", "wb"))
pickle.dump(others, open(data_folder / "others.pkl", "wb"))

self.input_shape = X_train.shape
self.input_shape = X_valid.shape

buffer = io.StringIO()
X_valid.info(verbose=True, buf=buffer, show_counts=True)
Expand Down

0 comments on commit d902220

Please sign in to comment.