You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
immediate_msg=f"\n- There are {len(long_indexes)} examples that are very long. These are rows: {long_indexes}\nFor conditional generation, and for classification the examples shouldn't be longer than 2048 tokens."
168
171
optional_msg=f"Remove {len(long_indexes)} long examples"
169
172
170
173
defoptional_fn(x):
171
-
returnx.drop(long_indexes)
174
+
175
+
long_indexes_to_drop=get_long_indexes(x)
176
+
iflong_indexes!=long_indexes_to_drop:
177
+
sys.stdout.write(f"The indices of the long examples has changed as a result of a previously applied recommendation.\nThe {len(long_indexes_to_drop)} long examples to be dropped are now at the following indices: {long_indexes_to_drop}\n")
0 commit comments