parse_summary: delete debug statements
All checks were successful
continuous-integration/laminar-eldarion Build 5 succeeded in 10 seconds .

This commit is contained in:
Starbeamrainbowlabs 2023-03-04 22:37:39 +00:00
parent 6d1cd66351
commit 945b91b089
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -15,16 +15,14 @@ export default function parse_summary(text) {
const sep_output_shape = lines[2].search("Output Shape"); const sep_output_shape = lines[2].search("Output Shape");
const sep_param_hash = lines[2].search("Param #"); const sep_param_hash = lines[2].search("Param #");
const sep_connected_to = has_connected_to ? lines[2].search("Connected to") : lines[2].length; const sep_connected_to = has_connected_to ? lines[2].search("Connected to") : lines[2].length;
console.log(`DEBUG:layers_raw`, layers_raw);
let layer_prev = null; let layer_prev = null;
let acc = []; let acc = [];
for (const line of layers_raw) { for (const line of layers_raw) {
console.log(`DEBUG:layers/line`, line, `CONDITION B`, line.trim().search(/^\-+$/));
if(line.trim().length == 0 || line.trim().search(/^[-_]+$/) > -1) { if(line.trim().length == 0 || line.trim().search(/^[-_]+$/) > -1) {
if(acc.length === 0) continue; if(acc.length === 0) continue;
console.log(`LAYER`);
console.log(`DEBUG:params`, acc.map(layer_line => layer_line.substring(sep_param_hash, sep_connected_to).trim())); // console.log(`DEBUG:params`, acc.map(layer_line => layer_line.substring(sep_param_hash, sep_connected_to).trim()));
// Handle parsed item // Handle parsed item
const result = { const result = {
name_raw: acc.map(layer_line => layer_line.substring(0, sep_output_shape).trim()).join(""), name_raw: acc.map(layer_line => layer_line.substring(0, sep_output_shape).trim()).join(""),
@ -41,7 +39,6 @@ export default function parse_summary(text) {
result.connected_to = [ layer_prev.name ]; result.connected_to = [ layer_prev.name ];
} }
console.log(`DEBUG:result`, result)
result.type = result.name_raw.match(/ \(([^)]+)(?:\)|$)/)[1]; result.type = result.name_raw.match(/ \(([^)]+)(?:\)|$)/)[1];
result.name = result.name_raw.split(/\s+/)[0]; result.name = result.name_raw.split(/\s+/)[0];