Skip to content

Commit

Permalink
Feature/add online scratch (#157)
Browse files Browse the repository at this point in the history
* simplify image sample usage

* simplify image

* add scratch demo

* add scipy into dependency

* add demo

* update readme

* add better scratch demo

* add more data

* support mannul image
  • Loading branch information
Superjomn authored and daming-lu committed Jan 15, 2018
1 parent c678924 commit 4316808
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions visualdl/server/visualDL
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ mock_data_path = os.path.join(SERVER_DIR, "./mock_data/")

log_reader = LogReader(args.logdir)

graph_image_path = None

# mannully put graph's image on this path also works.
graph_image_path = os.path.join(args.logdir, 'graph.jpg')

# return data
# status, msg, data
Expand Down Expand Up @@ -203,7 +203,7 @@ def histogram():
@app.route('/data/plugin/graphs/graph')
def graph():
# TODO(ChunweiYan) need to add a config for whether have graph.
if graph_image_path is None:
if graph_image_path is None or not os.path.isfile(graph_image_path):
data = {'url': ''}
else:
data = {'url': '/graphs/image'}
Expand Down

0 comments on commit 4316808

Please sign in to comment.