Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.json modified #12

Open
gretameglioli opened this issue Jul 9, 2024 · 4 comments
Open

config.json modified #12

gretameglioli opened this issue Jul 9, 2024 · 4 comments

Comments

@gretameglioli
Copy link

Dear all,
i was trying your finetuning code without using your dataset but converting mine so that it would fit the training process. I ran into a strange error saving the model. In your script, you use save_pretrained for each checkpoint, but I saved the model at the end. Even if the model itself, at the end of training step, worked correctly during inference, when I try to save it in a directory and then reload it the config.json file changed. In particular, model.config.vision_config.model_type which was "davit" became "" after the saving process.
Do you know the reason?
Thank you in advance.

@gretameglioli
Copy link
Author

I forgot to write thet the problem I depicted in the previous message brought me to the following error wher I tried to load the model once saved.

AssertionError: only DaViT is supported for now

@andimarafioti
Copy link
Owner

andimarafioti commented Jul 9, 2024

You can edit the model_type on the config.json file and set it to "davit". I don't know why it's saved wrong by default :/ But after that change everything should work :)

@jmtatsch
Copy link

jmtatsch commented Aug 18, 2024

Confirmed working,
make sure you alter model_type of vision_config and not one of the other model_types 🙃

@tingxueronghua
Copy link

This is strange... Really worry whether there is any other problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants