You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Config dataclasses like llama_recipes.configs.training.train_config should be named using PascalCase, in this case TrainConfig. The current naming violates a widely accepted Python convention.
It also leads to patterns like from llama_recipes.configs import train_config as TRAIN_CONFIGhere, where the symbol needs to be renamed upon import to avoid conflicts with a train_config variable, which is an instance of the train_config (TRAIN_CONFIG) class.
I'm happy to do the renames but I wanted to hear from the devs first. This change does break backwards compatibility but since llama-recipes is currently on version 0.0.4 I assume the whole API is still very experimental?
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hi @vvolhejn thanks for bringing this up. Avoiding to break bc was what lead to this outcome. This affects all config classes and we should make these changes to all configs simultaneously. Would be happy to review a PR. I am currently working on fixing the unit tests once again so we can test the proposed changes more reliably.
Would you be open to renaming if we rename all configs at once?
Regarding testing the changes, a typechecker like Pyright would catch this – it would detect when you're trying to import something that's not defined. I'm a fan of Pyright but it does come with some overhead, like needing to keep type stubs for packages that don't define them, like transformers, or sometimes needing to typing.cast values to convince the typechecker of something.
🚀 The feature, motivation and pitch
Config dataclasses like
llama_recipes.configs.training.train_config
should be named using PascalCase, in this caseTrainConfig
. The current naming violates a widely accepted Python convention.It also leads to patterns like
from llama_recipes.configs import train_config as TRAIN_CONFIG
here, where the symbol needs to be renamed upon import to avoid conflicts with atrain_config
variable, which is an instance of thetrain_config
(TRAIN_CONFIG
) class.I'm happy to do the renames but I wanted to hear from the devs first. This change does break backwards compatibility but since
llama-recipes
is currently on version0.0.4
I assume the whole API is still very experimental?Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: