-
Notifications
You must be signed in to change notification settings - Fork 491
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
Include a readable repr for ModelInfo #32
Conversation
I think the proposition of making To that end, I'm wondering if it wouldn't be better to have a |
@LysandreJik I do like that idea, let me work on that this weekend and I'll get back to you with what I come up with in regards to a presentable format/strings |
@LysandreJik apologies it took so long, had some final exams and projects that needed to get done! Here's my adjustments I've made, the ModelInfo: {
modelId: distilgpt2
sha: None
tags: ['pytorch', 'tf', 'tflite', 'rust', 'gpt2', 'lm-head', 'causal-lm', 'en', 'dataset:openwebtext', 'exbert', 'license:apache-2.0', 'text-generation']
pipeline_tag: text-generation
siblings: [<huggingface_hub.hf_api.ModelFile object at 0x7efdbba60090>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba600d0>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60110>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60150>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60190>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60210>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60250>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba60290>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba602d0>, <huggingface_hub.hf_api.ModelFile object at 0x7efdbba601d0>]
private: False
key:
} Which I think is more aligned to what you were wanting, while the Model Name: distilgpt2, Tags: ['pytorch', 'tf', 'tflite', 'rust', 'gpt2', 'lm-head', 'causal-lm', 'en', 'dataset:openwebtext', 'exbert', 'license:apache-2.0', 'text-generation'], Task: text-generation Do let me know your thoughts please! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks @muellerzr!
Before we merge, you seem to have code quality issues, could you run the following from the root of your clone?
|
@LysandreJik it seems to have picked up an unrelated file with it, but I ran the code quality |
Fantastic, thanks a lot for working on this! |
This includes the start of a better
__repr__
for theModelInfo
class, started from this issue: #31This is based on what I've started for the AdaptNLP
A few points of difference that could be done here is we could also programmatically include the tasks available for it, similar to what was done in AdaptNLP, but I guess the key information is what would be the best-case scenario for a model repr? Currently what I have lets it look like so:
For adapt I go a bit further (with the whole programmatic way I mentioned early) by checking what tags are also tasks and assigning them then.
The last thing is if we want something like:
What are your thoughts?
cc: @LysandreJik