Skip to content

Commit f9c6ac0

Browse files
committed
Fix using additional_feature.py
1 parent fb5b834 commit f9c6ac0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/using_additional_features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from sklearn.preprocessing import LabelEncoder
1313
from torchTextClassifiers import create_fasttext
1414
from torchTextClassifiers.utilities.preprocess import clean_text_feature
15-
15+
import time
1616

1717
def stratified_split_rare_labels(X, y, test_size=0.2, min_train_samples=1):
1818
# Get unique labels and their frequencies
@@ -56,7 +56,7 @@ def load_and_prepare_data():
5656
"""Load and prepare data"""
5757
print("📊 Using AG news dataset sample for demonstration...")
5858
df = pd.read_parquet("https://minio.lab.sspcloud.fr/h4njlg/public/ag_news_full_1M.parquet")
59-
df = df.sample(100000, random_state=42) # Smaller sample to avoid disk space issues
59+
df = df.sample(10000, random_state=42) # Smaller sample to avoid disk space issues
6060
print(f"✅ Loaded {len(df)} samples from AG NEWS dataset")
6161

6262
df['category_final'] = df['category'].apply(lambda x: merge_cat(x))

0 commit comments

Comments
 (0)