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

Find a way to deal with possible discrepancy between a card's model and model file in metadata #247

Open
BenjaminBossan opened this issue Dec 9, 2022 · 0 comments

Comments

@BenjaminBossan
Copy link
Collaborator

This was discussed here, I'll copy the points over (with slight modification):

We have a tricky situation in our Card class where there can be multiple sources of truth for what the actual model is. One source is the model attribute, the other the model as (optionally) defined by metadata.model_file.

  1. self.model is a model instance and there is no metadata.model_file
  2. self.model is a model instance and there is a metadata.model_file
  3. self.model is a str or Path and there is no metadata.model_file
  4. self.model is a str or Path and there is a metadata.model_file and they're identical
  5. self.model is a str or Path and there is a metadata.model_file and they're different

I think the getting started code snippet should always refer to the model_file from metadata if present. For case 3, one could argue that the path from self.model should be used for the getting started code snippet, but it's a bit surprising.

For the model diagram and hyperparams, I would argue we should use the data from self.model.

Ideally, we could agree on a "single source of truth" for the model, but it's not clear to me how to do that, as we don't have any mechanism to enforce that they're referring to the same model.

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

No branches or pull requests

2 participants