-
Notifications
You must be signed in to change notification settings - Fork 109
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
Documentation and typing of functions #5
Conversation
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.
2 important style things:
- Remove all the
The
at the start of arg docstrings. It makes them heavier to read.
Ex: instead ofThe revision of the model
, useModel revision (commit hash)
. - Follow the ref doc for optional items (try to be homogeneous)
One comment:
- Try to add and explain the small edge cases in the doc - why are we asking for the non obvious params? what happens when a param is None? Etc.
src/lighteval/models/model_config.py
Outdated
Base configuration class for models. | ||
|
||
Attributes: | ||
pretrained (str): The HuggingFace Hub model ID name or the path to a |
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.
- Remove all the
The
at the start of arg docstrings.
Ex: instead ofThe revision of the model
, useModel revision (commit hash) to use for evaluation
. - Follow the ref doc for optional items
- When an item is optional, don't forget to add it in the arg description. For example, for quantization config, you can add an "if needed" for ex.
name (str): The name of the task. | ||
cfg (dict): The configuration dictionary containing | ||
task-specific settings (from the task_table.json file). | ||
cache_dir (Optional[str], optional): The directory to cache the |
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.
What happens if the cache_dir is None
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.
cache dir is not used in the class. When loading the dataset, we manually set ache_dir to None
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.
We could remove it I guess :)
Co-authored-by: Clémentine Fourrier <[email protected]>
Co-authored-by: Clémentine Fourrier <[email protected]>
…into nathan-update-doc
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.
LGTM - could be cool to be more homogeneous for optional docs but it's a very minor nit
(Optional[type] vs type, optional)
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.
LGTM
`pretrained_model_name_or_path` argument of `from_pretrained` in the | ||
HuggingFace `transformers` API. | ||
accelerator (Accelerator): accelerator to use for model training. | ||
tokenizer (Optional[str]): HuggingFace Hub tokenizer ID that will be |
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.
should be str, optional
No description provided.