cbrew
commited on
Commit
·
8f6dfa8
1
Parent(s):
ae3f005
shuffle before partitioning
Browse files
hwu66.py
CHANGED
|
@@ -161,6 +161,9 @@ class Hwu66(datasets.GeneratorBasedBuilder):
|
|
| 161 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
| 162 |
|
| 163 |
df = pd.read_csv(filepath,sep=";")
|
|
|
|
|
|
|
|
|
|
| 164 |
df['label'] = df['scenario'] + '_' + df['intent']
|
| 165 |
TEST_SIZE = 2000
|
| 166 |
|
|
|
|
| 161 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
| 162 |
|
| 163 |
df = pd.read_csv(filepath,sep=";")
|
| 164 |
+
df = df.sample(frac=1.0, random_state=42)
|
| 165 |
+
|
| 166 |
+
|
| 167 |
df['label'] = df['scenario'] + '_' + df['intent']
|
| 168 |
TEST_SIZE = 2000
|
| 169 |
|