-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(controller): 8 - add command line interface for running on OSCAR #347
Conversation
This reverts commit 29da43c.
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.
Oh just realized that this is still in draft. I took a quick look at the typer and logging implementation and added some comments/suggestions.
_configure_logger(debug, verbose) | ||
controller_ = _load_manager(manager) | ||
|
||
_logger.debug(f"loading manager state from {directory=}") |
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 does the the =
after the directory do?
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.
that prints "directory=<directory name>"
which otherwise you'd have to print like: f"directory={directory}"
def _configure_logger(debug, verbose): | ||
if debug: | ||
logging.basicConfig(level=logging.DEBUG) | ||
_logger.debug("using DEBUG logging level") | ||
if verbose: | ||
logging.basicConfig(level=logging.INFO) | ||
_logger.info("using INFO logging level") |
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.
Debug level would be deactivated by info level if both debug
and verbose
are True. Doing if verbose
before if debug
would make more sense. Debug is actually more verbose than info because it is a lower level than info. Therefore both info and debug statements would be logged at debug level. Because of this I find the argument names are a bit confusing for this function. A single argument for the logging level would be more simple. I've done this with enum as log levels are just encoded integers.
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.
I think you're right that a single argument would be better, and a single logging.basicConfig
call. I'll include that in the next version
Co-authored-by: George Dang <[email protected]>
Too big, moving to new repo. |
Description
Add a command line interface for running AutoRA jobs.
Add examples showing how they can run asynchronously on Oscar using
cylc
.If the issue is on Github, simply link to it using the '#' symbol; otherwise, provide a notion page link):
TODO:
plot_utils
to a separate PR refactor: remove outdated plot_utils for darts #350logging.basicConfig
calls into a single call.Type of change
Delete as appropriate:
Features (Optional)
Controller
in https://github.com/AutoResearch/autora/blob/feat/controller-cli/autora/controller/__main__.py andTheorist
in https://github.com/AutoResearch/autora/blob/feat/controller-cli/autora/theorist/__main__.py.