forked from NVIDIA/DIGITS
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from NVIDIA/master
Merge
- Loading branch information
Showing
166 changed files
with
2,091 additions
and
2,333 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,16 +1,18 @@ | ||
# Ignore these file types | ||
*.cfg | ||
*.log | ||
*.pyc | ||
# Temporary files | ||
*.swp | ||
|
||
# Ignore emacs backup files | ||
*~ | ||
TAGS | ||
|
||
# Ignore these files | ||
.coverage | ||
# Compiled / optimized files | ||
*.py[cod] | ||
|
||
# Tests | ||
/.coverage | ||
|
||
# Ignore these directories | ||
# virtualenv | ||
/venv/ | ||
/digits/jobs/ | ||
|
||
# setuptools | ||
/build/ | ||
/dist/ | ||
/*.egg-info/ |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
recursive-include digits/templates * | ||
recursive-include digits/static * | ||
recursive-include digits/standard-networks * |
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,60 +1,6 @@ | ||
#!/usr/bin/env python2 | ||
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. | ||
#!/bin/bash | ||
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
|
||
import argparse | ||
import sys | ||
|
||
import digits | ||
|
||
if __name__ == '__main__': | ||
parser = argparse.ArgumentParser(description='Run the DIGITS development server') | ||
parser.add_argument('-p', '--port', | ||
type=int, | ||
default=5000, | ||
help='Port to run app on (default 5000)' | ||
) | ||
parser.add_argument('-c', '--config', | ||
action='store_true', | ||
help='Edit the application configuration' | ||
) | ||
parser.add_argument('-d', '--debug', | ||
action='store_true', | ||
help='Run the application in debug mode (reloads when the source changes and gives more detailed error messages)' | ||
) | ||
parser.add_argument('--version', | ||
action='store_true', | ||
help='Print the version number and exit' | ||
) | ||
|
||
args = vars(parser.parse_args()) | ||
|
||
from digits import config | ||
|
||
if args['version']: | ||
print digits.__version__ | ||
sys.exit() | ||
|
||
if args['config']: | ||
config.load_config('normal') | ||
else: | ||
config.load_config('quiet') | ||
|
||
from digits.webapp import app, socketio, scheduler | ||
|
||
print ' ___ ___ ___ ___ _____ ___' | ||
print ' | \_ _/ __|_ _|_ _/ __|' | ||
print ' | |) | | (_ || | | | \__ \\' | ||
print ' |___/___\___|___| |_| |___/', digits.__version__ | ||
|
||
try: | ||
if not scheduler.start(): | ||
print 'ERROR: Scheduler would not start' | ||
else: | ||
app.debug = args['debug'] | ||
socketio.run(app, '0.0.0.0', args['port']) | ||
except KeyboardInterrupt: | ||
pass | ||
finally: | ||
scheduler.stop() | ||
set -e | ||
|
||
python -m digits $@ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/digits.cfg | ||
/jobs/ | ||
/digits.log* |
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 +1,4 @@ | ||
__version__ = '4.1-dev' | ||
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. | ||
from __future__ import absolute_import | ||
|
||
from .version import __version__ |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. | ||
|
||
import argparse | ||
import os.path | ||
import sys | ||
|
||
|
||
# Update PATH to include the local DIGITS directory | ||
PARENT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
found_parent_dir = False | ||
for p in sys.path: | ||
if os.path.abspath(p) == PARENT_DIR: | ||
found_parent_dir = True | ||
break | ||
if not found_parent_dir: | ||
sys.path.insert(0, PARENT_DIR) | ||
|
||
|
||
def main(): | ||
parser = argparse.ArgumentParser(description='DIGITS server') | ||
parser.add_argument('-p', '--port', | ||
type=int, | ||
default=5000, | ||
help='Port to run app on (default 5000)' | ||
) | ||
parser.add_argument('-d', '--debug', | ||
action='store_true', | ||
help='Run the application in debug mode (reloads when the source changes and gives more detailed error messages)' | ||
) | ||
parser.add_argument('--version', | ||
action='store_true', | ||
help='Print the version number and exit' | ||
) | ||
|
||
args = vars(parser.parse_args()) | ||
|
||
import digits | ||
|
||
if args['version']: | ||
print digits.__version__ | ||
sys.exit() | ||
|
||
print ' ___ ___ ___ ___ _____ ___' | ||
print ' | \_ _/ __|_ _|_ _/ __|' | ||
print ' | |) | | (_ || | | | \__ \\' | ||
print ' |___/___\___|___| |_| |___/', digits.__version__ | ||
|
||
import digits.config | ||
import digits.log | ||
import digits.webapp | ||
|
||
try: | ||
if not digits.webapp.scheduler.start(): | ||
print 'ERROR: Scheduler would not start' | ||
else: | ||
digits.webapp.app.debug = args['debug'] | ||
digits.webapp.socketio.run(digits.webapp.app, '0.0.0.0', args['port']) | ||
except KeyboardInterrupt: | ||
pass | ||
finally: | ||
digits.webapp.scheduler.stop() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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,14 +1,20 @@ | ||
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. | ||
from __future__ import absolute_import | ||
|
||
import os | ||
# Create this object before importing the following imports, since they edit the list | ||
option_list = {} | ||
|
||
# These are the only two functions that the rest of DIGITS needs to use | ||
from .current_config import config_value | ||
from .load import load_config | ||
from . import caffe | ||
from . import gpu_list | ||
from . import jobs_dir | ||
from . import log_file | ||
from . import torch | ||
from . import server_name | ||
|
||
if 'DIGITS_MODE_TEST' in os.environ: | ||
# load the config automatically during testing | ||
# it's hard to do it manually with nosetests | ||
load_config() | ||
|
||
def config_value(option): | ||
""" | ||
Return the current configuration value for the given option | ||
""" | ||
return option_list[option] | ||
|
Oops, something went wrong.