-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssertionError: Output shape does not match input shape. Data loss has occured. #140
Comments
@R-N I have resolved the issue in the latest version. |
@alexheat Thank you. The error went away, but ShowClassSplits is empty. |
I see the problem. dataset.df["cat_name"] is empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code:
Environment:
Error:
AssertionError Traceback (most recent call last)
Cell In[13], line 1
----> 1 dataset.splitter.StratifiedGroupShuffleSplit(train_pct=.8, val_pct=.0, test_pct=.2, batch_size=1)
File ~\AppData\Roaming\Python\Python310\site-packages\pylabel\splitter.py:223, in Split.StratifiedGroupShuffleSplit(self, train_pct, test_pct, val_pct, weight, group_col, cat_col, batch_size)
218 df_val["split"] = "val"
220 df = pd.concat([df_train, pd.concat([df_test, df_val])])
222 assert (
--> 223 df.shape == df_main.shape
224 ), "Output shape does not match input shape. Data loss has occured."
226 self.dataset.df = df
227 self.dataset.df = self.dataset.df.reset_index(drop=True)
AssertionError: Output shape does not match input shape. Data loss has occured.
I have no idea what that means and what I should (or shouldn't) do.
The text was updated successfully, but these errors were encountered: