-
-
Notifications
You must be signed in to change notification settings - Fork 910
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
CLI cleanup and documentation #2244
base: main
Are you sure you want to change the base?
Conversation
def preprocess(config: str, **kwargs): | ||
"""Preprocess datasets before training.""" | ||
kwargs = {k: v for k, v in kwargs.items() if v is not None} | ||
@filter_none_kwargs |
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.
noob q: why do we need these?
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.
The filter_none_kwargs
wrapper? It removes arguments that have None
values, which were added by my Click option adding wrappers. I think we could probably just modify the Click option adding wrappers but this works for now.
I had a quick first skim, this looks great. Thanks for cleaning this up, the cli module is substantially more readable. |
cli_args: Command line arguments | ||
dataset_meta: Dataset metadata containing training and evaluation datasets | ||
cfg: Config dictionary. | ||
dataset_meta: Dataset metadata containing training and evaluation datasets. | ||
|
||
Returns: | ||
Tuple containing: |
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.
Is this right?
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.
Yes, why?
Various minor nits, but LGTM! I'll let the others review+stamp. |
78d79ce
to
28ade9f
Compare
Description
This PR implements a cleanup / modularization of the code under
axolotl/cli
, where previously, many of the functions were lumped together in theaxolotl/cli/__init__.py
file.Motivation and Context
These changes allow for better organization / readability and decluttering of the
axolotl.cli
namespace.How has this been tested?
CLI tests pass.
Types of changes
Added doc strings, removed dead code, refactored methods etc. out of
axolotl/cli/__init__.py
into aptly-named modules.