Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
12ca169
Implement loss function node for explicit loss selection
claude Feb 14, 2026
fcb959c
Add code quality enhancements and robustness improvements
claude Feb 14, 2026
7f6cd0b
Fix Loss node UI layout and port positioning
claude Feb 15, 2026
ecd1d8f
Fix Loss node UI with internal port labels
claude Feb 15, 2026
8e7d478
Align Loss node handles with label rows
claude Feb 15, 2026
6307356
Add Ground Truth node and remove CSV upload
claude Feb 15, 2026
b941284
Fix shape propagation for DataLoader and Ground Truth nodes
claude Feb 15, 2026
22b18db
Immediately recalculate output shapes on input/config changes
claude Feb 15, 2026
d345da9
Fix Input node to be passthrough when connected to DataLoader
claude Feb 15, 2026
b74f16e
Fix Loss and GroundTruth port semantics and output handles
claude Feb 15, 2026
ec26436
Fix validation to exclude source and terminal nodes from connection w…
claude Feb 15, 2026
1233e66
Add missing codegen support for GroundTruth and fix MaxPool type mism…
claude Feb 15, 2026
7cb00e6
Add get_pytorch_code_spec to GroundTruth and exclude from layer gener…
claude Feb 15, 2026
b17d1a8
Complete frontend-backend compatibility audit fixes
claude Feb 15, 2026
f58f1d7
fix model name
RETR0-OS Feb 16, 2026
fd11de6
Fix generated scripts.
RETR0-OS Feb 16, 2026
d08f3b0
feat: Add metrics node support for PyTorch and TensorFlow
RETR0-OS Feb 16, 2026
9665aaf
feat: Enhance support for metrics nodes in PyTorch and TensorFlow orc…
RETR0-OS Feb 16, 2026
720f77a
Apply suggestion from @Copilot
RETR0-OS Feb 17, 2026
7328ff8
fix: Address PR review comments on code generation pipeline
github-actions[bot] Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions project/block_manager/services/codegen/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ def topological_sort(nodes: List[Dict], edges: List[Dict]) -> List[Dict]:
if in_degree[neighbor] == 0:
queue.append(neighbor)

# Cycle detection: if not all nodes were sorted, there's a cycle
if len(sorted_ids) != len(nodes):
# Find nodes that are still in the cycle (have non-zero in-degree)
cycle_nodes = [node_id for node_id, degree in in_degree.items() if degree > 0]
raise ValueError(
f"Graph contains a cycle. Neural networks must be acyclic (feedforward). "
f"Nodes involved in cycle: {', '.join(cycle_nodes[:5])}"
+ (" and more..." if len(cycle_nodes) > 5 else "")
)

# Return nodes in sorted order
return [node_map[node_id] for node_id in sorted_ids if node_id in node_map]

Expand Down
6 changes: 3 additions & 3 deletions project/block_manager/services/codegen/base_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _generate_code_specs(

processable_nodes = [
n for n in sorted_nodes
if get_node_type(n) not in ('input', 'dataloader', 'output')
if get_node_type(n) not in ('input', 'dataloader', 'output', 'loss', 'metrics', 'groundtruth')
]

for node in processable_nodes:
Expand Down Expand Up @@ -193,7 +193,7 @@ def _generate_forward_pass(

processable_nodes = [
n for n in sorted_nodes
if get_node_type(n) not in ('output',)
if get_node_type(n) not in ('output', 'loss', 'metrics', 'groundtruth')
]

for node in processable_nodes:
Expand Down Expand Up @@ -273,7 +273,7 @@ def _generate_config_file(self, nodes: List[Dict[str, Any]]) -> str:
input_shape = self._extract_input_shape(nodes)
layer_count = sum(
1 for n in nodes
if get_node_type(n) not in ('input', 'output', 'dataloader')
if get_node_type(n) not in ('input', 'output', 'dataloader', 'loss', 'metrics', 'groundtruth')
)

if layer_count > 20:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _generate_internal_node_specs(
node_type = get_node_type(node)

# Skip special nodes
if node_type in ('input', 'output', 'dataloader'):
if node_type in ('input', 'output', 'dataloader', 'loss'):
continue

node_id = node['id']
Expand Down Expand Up @@ -273,8 +273,8 @@ def _generate_forward_pass(
var_map[node_id] = var_name
continue

# Skip output and dataloader nodes (they don't produce code)
if node_type in ('output', 'dataloader'):
# Skip output, dataloader, and loss nodes (they don't produce code)
if node_type in ('output', 'dataloader', 'loss'):
continue

# Get the spec for this node
Expand Down
Loading
Loading