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

Question about using multiple gin files for multiple models with clashing parameters #201

Open
snnithya opened this issue May 10, 2024 · 0 comments

Comments

@snnithya
Copy link

Hi, I have trained two models (say A and B) separately, each with their respective gin files. The problem now is that I want to load both models within the same script for inference since the output of model A goes as input into model B. However, the gin files of A and B have certain common parameters defined with different values. For instance, the function to load the dataset in the Dataset class has different preprocessing functions for each model and are both referred to with the parameter Dataset.task_fn. Thus if I use gin.configure_files_and_bindings to load both files, the Dataset.task_fn value gets overwritten by one of the gin files. Is there some way around this?

One solution I could think of is defining the common parameters within different gin files for instance in model A's gin file, defining the parameter as modelA/Dataset.task_fn and similarly modelB/Dataset.task_fn for modelB and thus in python, I would load the models within their respective scopes. This seems kind of hacky and would involve me changing the gin files. I was wondering if there is a better solution I can use?

Thanks in advance!!

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

1 participant