Hi. I have fine-tuned a model, then save it to local disk. But when I load my local mode with pipeline, it looks like pipeline is finding model from online repositories. How can i fix it ? Please help.
My code for training and save model to local disk:
from transformers import Seq2SeqTrainingArguments
training_args = Seq2SeqTrainingArguments(
output_dir="./my_local_disk",
per_device_train_batch_size=16,
max_steps=4000,
fp16=True,
logging_steps=25,
report_to=["tensorboard"],
load_best_model_at_end=True,
greater_is_better=False,
push_to_hub=False,
)
Then I load it to pipeline:
from transformers import pipeline
pipe = pipeline(model="./my_local_disk")
But I got this error when create pipeline object:
OSError: ./my_local_disk does not appear to have a file named config.json.
Checkout 'https://huggingface.co/./my_local_disk/None' for available files.
It looks like pipeline is loading from online repositories, not my local folder. Please help me fix it