Skip to content

Commit 08a67a3

Browse files
authored
Merge pull request #107 from david-thrower/106-inconsistancies-in-network-graph-parsing
106 inconsistancies in network graph parsing
2 parents f10d0e6 + b953475 commit 08a67a3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Python application
55

66
on:
77
push:
8-
branches: [ "main", "100-test-with-pandas-2-0-x-1-post-updates" ]
8+
branches: [ "main", "106-inconsistancies-in-network-graph-parsing" ]
99

1010
permissions:
1111
contents: read

cerebros/simplecerebrosrandomsearch/simple_cerebros_random_search.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ class SimpleCerebrosRandomSearch(DenseAutoMlStructuralComponent,
258258
will be multiplied by p_lateral_connection where x is the number
259259
of subsequent connections after the first
260260
num_lateral_connection_tries_per_unit: int: defaults to 1,
261+
self.chart_network_graph: bool: default: False,
262+
Whether or not Cerebros will create visualizations of the neural
263+
network graphs. When recursively running Cerebros for hyperparameter
264+
tuning, we recommned the default of False. When running a single, easily repeatable
265+
training task that will not run for long, or when debugging a failed run with an error
266+
in the network graph, it may provide useful information.
261267
*args,
262268
**kwargs
263269
@@ -308,6 +314,7 @@ def __init__(
308314
meta_trial_number=0,
309315
base_models=[''],
310316
train_data_dtype=tf.float32,
317+
chart_network_graph: bool=False,
311318
*args,
312319
**kwargs):
313320

@@ -367,6 +374,7 @@ def __init__(
367374
self.base_models = base_models
368375
self.best_model_path = ""
369376
self.train_data_dtype = train_data_dtype
377+
self.chart_network_graph = chart_network_graph
370378
# Can be varied throughout the serch session;
371379
# must be controlled internally
372380
DenseAutoMlStructuralComponent.__init__(
@@ -475,7 +483,8 @@ def run_moity_permutations(self, spec, subtrial_number, lock):
475483
nnf.compile_neural_network()
476484
neural_network = nnf.materialized_neural_network
477485
print(nnf.materialized_neural_network.summary())
478-
nnf.get_graph()
486+
if self.chart_network_graph:
487+
nnf.get_graph()
479488

480489
history = neural_network.fit(x=self.training_data,
481490
y=self.labels,

0 commit comments

Comments
 (0)