LukasGe commited on
Commit
13e0012
1 Parent(s): 725c6c9

Update load_data.py

Browse files
Files changed (1) hide show
  1. load_data.py +4 -4
load_data.py CHANGED
@@ -20,7 +20,7 @@ HUB_DATASET_NAME = os.environ.get('HUB_DATASET_NAME') #get dataset name
20
  )
21
  def save_validated_to_hub(records, ctx):
22
  if len(records) > 0:
23
- ds = rg.DatasetForTextClassification(records=records).to_datasets()
24
  if HF_TOKEN:
25
  print("Pushing the dataset")
26
  print(ds)
@@ -57,9 +57,9 @@ class LoadDatasets:
57
  dataset = dataset.remove_columns("metrics")
58
  records = rg.DatasetForTokenClassification.from_datasets(dataset)
59
 
60
- #settings = rg.TokenClassificationSettings(
61
- # label_schema=["BAD INSTRUCTION", "BAD INPUT", "BAD OUTPUT", "INAPPROPRIATE", "BIASED", "ALL GOOD"]
62
- #)
63
  rg.configure_dataset(name="job-title-tagging", settings=settings, workspace="team")
64
 
65
  # Log the dataset
 
20
  )
21
  def save_validated_to_hub(records, ctx):
22
  if len(records) > 0:
23
+ ds = rg.DatasetForTokenClassification(records=records).to_datasets()
24
  if HF_TOKEN:
25
  print("Pushing the dataset")
26
  print(ds)
 
57
  dataset = dataset.remove_columns("metrics")
58
  records = rg.DatasetForTokenClassification.from_datasets(dataset)
59
 
60
+ settings = rg.TokenClassificationSettings(
61
+ label_schema=["B-FUN", "I-FUN", "B-RES", "I-RES", "B-LEVEL", "I-LEVEL"]
62
+ )
63
  rg.configure_dataset(name="job-title-tagging", settings=settings, workspace="team")
64
 
65
  # Log the dataset