MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / findNodeById

Function findNodeById

flow-debugger/debugger-ui/src/parser.js:334–354  ·  view source on GitHub ↗
(config, graph_name, id)

Source from the content-addressed store, hash-verified

332};
333
334function findNodeById(config, graph_name, id) {
335 for (const node of Object.values(config.graphs[graph_name].nodes)) {
336 if ((id in node.link) && node.link.id === id) {
337 return node;
338 }
339 }
340 for (const node of Object.values(config.nodes)) {
341 if ((id in node.link) && node.link.id === id) {
342 return node;
343 }
344 }
345 for (const graph of Object.values(config.graphs)) {
346 if (graph.name === graph_name) continue;
347 for (const node of Object.values(graph.nodes)) {
348 if ((id in node.link) && node.link.id === id) {
349 return node;
350 }
351 }
352 }
353 return null;
354}
355
356export const splitQpsNode = (config, graph_name, node) => {
357 let splitNode = (cfg) => {

Callers 2

inputsFunction · 0.85
outputsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected