Hello team! We are writing a pipeline where we hav...
# questions
g
Hello team! We are writing a pipeline where we have to load some HF models and tokenisers, and then save a fine-tuned model. Is there a way to use the catalog to upload the models or we have to hardcode the directories in the parameters? Thanks! For context we are loading the models with the following
Copy code
from transformers import AutoTokenizers, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("model_name")
model = AutoModelForSequenceClassification.from_pretrained(model_name)
And we are saving the finetuned one with the following
Copy code
from transformers import Trainer

trainer = Trainer(model=model, ...)

trainer.train()

trainer.save_model(saving_path)
m
Hello @Giuseppe Ughi, I guess you can add custom dataset to handle the saving. The current available huggingface datasets we have only handle loading (https://github.com/kedro-org/kedro-plugins/tree/main/kedro-datasets/kedro_datasets/huggingface), but maybe this can serve as inspiration. Perhaps @Juan Luis has some insights into why saving isn't an option on those?
👀 1
👍 1
g
Thank you! Building the custom dataset seems the only way 🙂