-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit 6508922.
- Loading branch information
1 parent
6508922
commit fe43f3a
Showing
6 changed files
with
69 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
# coding=utf-8 | ||
# Copyright (c) DIRECT Contributors | ||
"""DIRECT Command-line interface. This is the file which builds the main parser.""" | ||
"""DIRECT Command-line interface. This is the file which builds the main parser. Currently just a placeholder""" | ||
import argparse | ||
import sys | ||
|
||
|
||
def main(): | ||
""" | ||
Console script for direct. | ||
Console script for dlup. | ||
""" | ||
# From https://stackoverflow.com/questions/17073688/how-to-use-argparse-subparsers-correctly | ||
root_parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) | ||
|
||
root_subparsers = root_parser.add_subparsers(help="Direct CLI utils to run.") | ||
root_subparsers = root_parser.add_subparsers(help="DIRECT utilities.") | ||
root_subparsers.required = True | ||
root_subparsers.dest = "subcommand" | ||
|
||
# Prevent circular import | ||
from direct.cli.train import register_parser as register_train_subcommand | ||
|
||
# Training images related commands. | ||
register_train_subcommand(root_subparsers) | ||
|
||
args = root_parser.parse_args() | ||
args.subcommand(args) | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
main() | ||
sys.exit(main()) # pragma: no cover |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
# Direct tools | ||
|
||
Scripts are provided: | ||
- To train a model use `train_model.py`. | ||
- To extract the best checkpoint based on `metrics.json`, use `parse_metrics_log.py`. | ||
|
||
|
||
## Tips and tricks | ||
|
||
- We are using a lot of experimental features in pytorch, to reduce such warnings you can use | ||
`export PYTHONWARNINGS="ignore"` in the shell before execution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters