-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add command lines orion db dump
and orion db load
#1005
Conversation
Move dump logic into a function.
- Raise DatabaseError when error occurs in the script - If found many experiments for a given name, pick experiment with lower version
- raise DatabaseError when errors occur in th script - If found many experiments for a given name, pick experiment with lower version
orion db dump
and orion db load
orion db dump
and orion db load
|
||
cli.get_basic_args_group(dump_parser) | ||
|
||
dump_parser.add_argument( |
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 should add a --force
option and avoid overwritting the output file if it already exists and --force
is not passed.
|
||
def dump_database(orig_db, dump_host, experiment=None, version=None): | ||
"""Dump a database | ||
:param orig_db: database to dump |
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 try to uniformise all docstrings to numpy format.
"-r", | ||
"--resolve", | ||
type=str, | ||
choices=("ignore", "overwrite", "bump"), |
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 don't remember, did we discuss about making one choice the default one? Is it that if we don't specify one it will be prompted if needed?
Co-authored-by: Xavier Bouthillier <xavier.bouthillier@gmail.com>
Co-authored-by: Xavier Bouthillier <xavier.bouthillier@gmail.com>
Closed, continued here: #1082 |
Description
Hi @bouthilx ! This is a PR to fix #953 . Commands
orion db dump
andorion db load
are added.orion db dump
show already fully workorion db load
should work with parameter--exp
, and for full import if there is no ID collision.TODO
orion db load
work when there is ID collision on full import.Changes
Add commands
orion db dump
andorion db load
Checklist
Tests
$ tox -e py38
; replace38
by your Python version if necessary)Documentation
Quality
$ tox -e lint
)