Skip to content

Commit

Permalink
Merge pull request #7 from NoahStapp/polish
Browse files Browse the repository at this point in the history
More small fixes
  • Loading branch information
NoahStapp authored Aug 6, 2018
2 parents 2fceb10 + c251baa commit 84158fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion plyto/keras_accuracy_loss_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@ def on_batch_end(self, batch, logs={}):
"accuracy": self.accuracy,
}
)
if self.total_progress % 256 == 0 or self.total_progress == (self.epochs * self.sample_amount):
if self.total_progress % 256 == 0 or self.total_progress == (
self.epochs * self.sample_amount
):
self.plyto.send_data()
2 changes: 1 addition & 1 deletion plyto/plyto.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PlytoAPI:
:param progress: the current progress of iterating through the dataset
"""

def __init__(self, spec, size={}, steps={}):
def __init__(self, spec, size=0, steps=0):
self.spec = spec
self.size = size
self.total_steps = steps
Expand Down
12 changes: 10 additions & 2 deletions src/ModelViewWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,17 @@ class ModelViewPanel extends React.Component<
}

render() {
if (this.state.updateGraph && this.state.dataSet.length !== 0) {
let options = {
actions: {
export: true,
source: false,
compiled: false,
editor: false
}
};
if (this.state.updateGraph) {
this.state.spec.forEach(spec => {
VegaEmbed('#' + spec['name'], spec).then(res => {
VegaEmbed('#' + spec['name'], spec, options).then(res => {
res.view.insert('dataSet', this.state.dataSet).run();
});
});
Expand Down

0 comments on commit 84158fc

Please sign in to comment.