abarbosa commited on
Commit
3a1043e
1 Parent(s): 08c2e42

update essay origin

Browse files
Files changed (1) hide show
  1. aes_enem_dataset.py +12 -12
aes_enem_dataset.py CHANGED
@@ -340,14 +340,14 @@ class AesEnemDataset(datasets.GeneratorBasedBuilder):
340
  if self.config.name == "sourceAWithGraders":
341
  grader_a, grader_b = self._parse_graders_data(dirname)
342
  grader_a_data = pd.merge(
343
- train_df[["id", "id_prompt"]],
344
- grader_a,
345
  on=["id", "id_prompt"],
346
  how="inner",
347
  )
348
  grader_b_data = pd.merge(
349
- train_df[["id", "id_prompt"]],
350
- grader_b,
351
  on=["id", "id_prompt"],
352
  how="inner",
353
  )
@@ -355,14 +355,14 @@ class AesEnemDataset(datasets.GeneratorBasedBuilder):
355
  train_df = pd.concat([train_df, grader_b_data])
356
 
357
  grader_a_data = pd.merge(
358
- val_df[["id", "id_prompt"]],
359
- grader_a,
360
  on=["id", "id_prompt"],
361
  how="inner",
362
  )
363
  grader_b_data = pd.merge(
364
- val_df[["id", "id_prompt"]],
365
- grader_b,
366
  on=["id", "id_prompt"],
367
  how="inner",
368
  )
@@ -370,14 +370,14 @@ class AesEnemDataset(datasets.GeneratorBasedBuilder):
370
  val_df = pd.concat([val_df, grader_b_data])
371
 
372
  grader_a_data = pd.merge(
373
- test_df[["id", "id_prompt"]],
374
- grader_a,
375
  on=["id", "id_prompt"],
376
  how="inner",
377
  )
378
  grader_b_data = pd.merge(
379
- test_df[["id", "id_prompt"]],
380
- grader_b,
381
  on=["id", "id_prompt"],
382
  how="inner",
383
  )
 
340
  if self.config.name == "sourceAWithGraders":
341
  grader_a, grader_b = self._parse_graders_data(dirname)
342
  grader_a_data = pd.merge(
343
+ train_df[["id", "id_prompt","essay"]],
344
+ grader_a.drop(columns=['essay']),
345
  on=["id", "id_prompt"],
346
  how="inner",
347
  )
348
  grader_b_data = pd.merge(
349
+ train_df[["id", "id_prompt","essay"]],
350
+ grader_b.drop(columns=['essay']),
351
  on=["id", "id_prompt"],
352
  how="inner",
353
  )
 
355
  train_df = pd.concat([train_df, grader_b_data])
356
 
357
  grader_a_data = pd.merge(
358
+ val_df[["id", "id_prompt","essay"]],
359
+ grader_a.drop(columns=['essay']),
360
  on=["id", "id_prompt"],
361
  how="inner",
362
  )
363
  grader_b_data = pd.merge(
364
+ val_df[["id", "id_prompt","essay"]],
365
+ grader_b.drop(columns=['essay']),
366
  on=["id", "id_prompt"],
367
  how="inner",
368
  )
 
370
  val_df = pd.concat([val_df, grader_b_data])
371
 
372
  grader_a_data = pd.merge(
373
+ test_df[["id", "id_prompt","essay"]],
374
+ grader_a.drop(columns=['essay']),
375
  on=["id", "id_prompt"],
376
  how="inner",
377
  )
378
  grader_b_data = pd.merge(
379
+ test_df[["id", "id_prompt","essay"]],
380
+ grader_b.drop(columns=['essay']),
381
  on=["id", "id_prompt"],
382
  how="inner",
383
  )