marinone94 commited on
Commit
e07fd66
1 Parent(s): 4e6639e

fix model cards

Browse files
run_speech_recognition_seq2seq_streaming.py CHANGED
@@ -571,7 +571,7 @@ def main():
571
 
572
  if data_args.audio_column_name not in raw_datasets_features:
573
  raise ValueError(
574
- f"--audio_column_name '{data_args.audio_column_name}' not found in dataset '{data_args.dataset_name}'. "
575
  "Make sure to set `--audio_column_name` to the correct audio column - one of "
576
  f"{', '.join(raw_datasets_features)}."
577
  )
@@ -579,7 +579,7 @@ def main():
579
  data_args.text_column_name = data_args.text_column_name.split(",")[0]
580
  if data_args.text_column_name not in raw_datasets_features:
581
  raise ValueError(
582
- f"--text_column_name {data_args.text_column_name} not found in dataset '{data_args.dataset_name}'. "
583
  "Make sure to set `--text_column_name` to the correct text column - one of "
584
  f"{', '.join(raw_datasets_features)}."
585
  )
@@ -833,14 +833,19 @@ def main():
833
  "tasks": "automatic-speech-recognition",
834
  "tags": "whisper-event",
835
  }
836
- if data_args.dataset_name is not None:
837
- kwargs["dataset_tags"] = data_args.dataset_name
838
- if data_args.dataset_config_name is not None:
839
- kwargs["dataset"] = f"{data_args.dataset_name} {data_args.dataset_config_name}"
 
 
840
  else:
841
- kwargs["dataset"] = data_args.dataset_name
842
  # if "common_voice" in data_args.dataset_name:
843
  # kwargs["language"] = data_args.dataset_config_name[:2]
 
 
 
844
  if model_args.model_index_name is not None:
845
  kwargs["model_name"] = model_args.model_index_name
846
 
 
571
 
572
  if data_args.audio_column_name not in raw_datasets_features:
573
  raise ValueError(
574
+ f"--audio_column_name '{data_args.audio_column_name}' not found in dataset. "
575
  "Make sure to set `--audio_column_name` to the correct audio column - one of "
576
  f"{', '.join(raw_datasets_features)}."
577
  )
 
579
  data_args.text_column_name = data_args.text_column_name.split(",")[0]
580
  if data_args.text_column_name not in raw_datasets_features:
581
  raise ValueError(
582
+ f"--text_column_name {data_args.text_column_name} not found in dataset. "
583
  "Make sure to set `--text_column_name` to the correct text column - one of "
584
  f"{', '.join(raw_datasets_features)}."
585
  )
 
833
  "tasks": "automatic-speech-recognition",
834
  "tags": "whisper-event",
835
  }
836
+ if data_args.dataset_train_name is not None:
837
+ dataset_name = list(set(data_args.dataset_train_name.split(",")))
838
+ kwargs["dataset_tags"] = dataset_name
839
+ if data_args.dataset_train_config_name is not None:
840
+ dataset_config_name = list(set(data_args.dataset_train_config_name.split(",")))
841
+ kwargs["dataset"] = f"{dataset_name} {dataset_config_name}"
842
  else:
843
+ kwargs["dataset"] = dataset_name
844
  # if "common_voice" in data_args.dataset_name:
845
  # kwargs["language"] = data_args.dataset_config_name[:2]
846
+ if data_args.language_train is not None:
847
+ languages = list(set(data_args.language_train.split(",")))
848
+ kwargs["language"] = languages
849
  if model_args.model_index_name is not None:
850
  kwargs["model_name"] = model_args.model_index_name
851
 
test_run_nordic.sh CHANGED
@@ -8,10 +8,10 @@ python $1run_speech_recognition_seq2seq_streaming.py \
8
  --dataset_eval_config_name="sv-SE,da,nn-NO" \
9
  --language_eval="swedish,danish,norwegian" \
10
  --eval_split_name="test" \
11
- --model_index_name="Whisper Tiny Swedish" \
12
  --max_train_samples="64" \
13
  --max_eval_samples="32" \
14
- --max_steps="50" \
15
  --output_dir="./" \
16
  --per_device_train_batch_size="8" \
17
  --per_device_eval_batch_size="4" \
 
8
  --dataset_eval_config_name="sv-SE,da,nn-NO" \
9
  --language_eval="swedish,danish,norwegian" \
10
  --eval_split_name="test" \
11
+ --model_index_name="Whisper Tiny Nordic" \
12
  --max_train_samples="64" \
13
  --max_eval_samples="32" \
14
+ --max_steps="8" \
15
  --output_dir="./" \
16
  --per_device_train_batch_size="8" \
17
  --per_device_eval_batch_size="4" \