Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

requiring all inherited model.tar.gz after transfer learning coreference #5604

Closed
davidberenstein1957 opened this issue Mar 24, 2022 · 4 comments
Labels

Comments

@davidberenstein1957
Copy link

Hello, I have trained a coreference model which resulted in model_1.tar.gz . Afterwards, I decided to use this model in the training config by adding the following key to the .jsonnet.

"model": {
    "type": "from_archive",
    "archive_file": "allennlp_output_1/model_1.tar.gz"
 }

This worked nicely and resulted in a better model_2.tar.gz. However, upon loading model_2.tar.gz via Predictor.from_path("./allennlp_output_1/model_1.tar.gz") it requires the allennlp_output_1/model_1.tar.gz to be present as well.

@epwalsh
Copy link
Member

epwalsh commented Mar 24, 2022

@AkshitaB, @dirkgr, I think you all had a solution to this at one point?

@davidberenstein1957
Copy link
Author

@epwalsh similarly, loading a model with a custom datasetloader, require that dataset loader to have been registered, even though I just want to use the model for inference.

@epwalsh
Copy link
Member

epwalsh commented Mar 25, 2022

@davidberenstein1957 that surprises me. Can you post a stacktrace when you get a chance?

@epwalsh
Copy link
Member

epwalsh commented Mar 25, 2022

So, the main issue here was brought up in #5211, but we're not likely to implement the solution anytime soon. We just don't have the bandwidth are we're no longer focused on adding new features to AllenNLP. But there is a work-around: you could just update the config.json file within the archive of model_2.tar.gz and remove the reference to allennlp_output_1/model_1.tar.gz.

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

No branches or pull requests

2 participants