ValueError: Need either a dataset name or a training/validation file
I am fine tuning gpt-2 following the example script:export TRAIN_FILE=/path/to/dataset/wiki.train.rawexport TEST_FILE=/path/to/dataset/wiki.test.rawpython run_lm_finetuning.py–output_dir=output–model_type=gpt2–model_name_or_path=gpt2–do_train–train_data_file=$TRAIN_FILE–do_eval–eval_data_file=$TEST_FILEI am using run_clm.py in this link:github.comhuggingface/transformers/blob/main/examples/tensorflow/language-modeling/run_clm.py#!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Fine-tuning the library models for causal language modeling (GPT-2, GPT-Neo...)
on a text file or a dataset without using HuggingFace Trainer.

Here is the full list of checkpoints on the hub that can be fine-tuned by this script:This file has been truncated.show originalI got:Traceback (most recent call last):File “/Users/wenzhao/Downloads/Keras/run_clm.py”, line 627, inmain()File “/Users/wenzhao/Downloads/Keras/run_clm.py”, line 222, in mainmodel_args, data_args, training_args = parser.parse_args_into_dataclasses()File “/Users/wenzhao/anaconda3/lib/python3.10/site-packages/transformers/REDACTED_TOKEN.py”, line 346, in parse_args_into_dataclassesobj = dtype(**inputs)File “”, line 15, ininitFile “/Users/wenzhao/Downloads/Keras/run_clm.py”, line 200, inpost_initraise ValueError(“Need either a dataset name or a training/validation file.”)ValueError: Need either a dataset name or a training/validation file.
2023-06-24T09:28:57Z
Hi,The flag is called--train_file, not–train_data_file