55 lines
7.2 KiB
Plaintext
55 lines
7.2 KiB
Plaintext
<mxfile host="app.diagrams.net" modified="2026-10-15T15:00:00.000Z" agent="Copilot" version="24.7.17">
|
|
<diagram id="generator-code" name="C4 Level 4 - Generator Code">
|
|
<mxGraphModel dx="1422" dy="794" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1800" pageHeight="1100" math="0" shadow="0">
|
|
<root>
|
|
<mxCell id="0"/>
|
|
<mxCell id="1" parent="0"/>
|
|
<mxCell id="title" value="TrainingGenerationService - C4 Level 4: Code Relationships" style="text;html=1;align=center;fontSize=24;fontStyle=1" vertex="1" parent="1">
|
|
<mxGeometry x="400" y="20" width="1000" height="40" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="service" value="<b>TrainingGenerationService</b><br>+ GenerateAsync()<br>- GenerateCategoryAsync()<br>- CreatePlan()<br>- GeneratePassAsync()<br>- PersistOrderedAsync()<br>- FindResumableRunAsync()<br>- ValidateGeneratedValue()" style="swimlane;html=1;startSize=30;rounded=0;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="660" y="310" width="360" height="280" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="reader" value="<b>TrainingDataReader</b><br>+ ValidateAsync()<br>+ ReadCategoryValuesAsync()<br>+ ReadPatternsAsync()" style="swimlane;html=1;startSize=30;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="130" y="120" width="290" height="150" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="definitions" value="<b>Training definitions</b><br>TrainingCategories<br>TrainingSubjects<br>TrainingCategoryDefinition<br>TrainingCategoryValue" style="swimlane;html=1;startSize=30;fillColor=#d5e8d4;strokeColor=#82b366;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="120" y="390" width="310" height="180" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="lmclient" value="<b>LmStudioClient</b><br>+ CompleteAsync()<br>- ResolveFragmentTokens()<br>- ResolveArticles()<br>- SendCompletionAsync()" style="swimlane;html=1;startSize=30;fillColor=#e1d5e7;strokeColor=#9673a6;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="1250" y="120" width="300" height="180" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="options" value="<b>Configuration</b><br>GenerationOptions<br>LmStudioOptions<br>SentenceTenses" style="swimlane;html=1;startSize=30;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="1260" y="390" width="280" height="150" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="context" value="<b>RlhfGeneratorDbContext</b><br>DbSet<Category><br>DbSet<TrainingItem><br>DbSet<GenerationRun><br>DbSet<Keyword><br>DbSet<KeywordVariant>" style="swimlane;html=1;startSize=30;fillColor=#f8cecc;strokeColor=#b85450;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="650" y="760" width="380" height="200" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="run" value="<b>GenerationRun</b><br>Status, seed, fingerprints<br>checkpoint and counts<br>failure/cancellation data" style="swimlane;html=1;startSize=30;fillColor=#f8cecc;strokeColor=#b85450;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="180" y="760" width="300" height="160" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="item" value="<b>TrainingItem</b><br>RecordKey, PlanOrdinal<br>Category, Keyword<br>IsPositive, Value" style="swimlane;html=1;startSize=30;fillColor=#f8cecc;strokeColor=#b85450;fontSize=13;align=left;spacingLeft=8" vertex="1" parent="1">
|
|
<mxGeometry x="1200" y="760" width="300" height="160" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="channel" value="<b>Bounded Channel</b><br>Parallel workers write completed plan items; ordered writer consumes" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;fontSize=13" vertex="1" parent="1">
|
|
<mxGeometry x="690" y="120" width="300" height="110" as="geometry"/>
|
|
</mxCell>
|
|
<mxCell id="e1" value="Validates and reads inputs" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="service" target="reader"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e2" value="Returns" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="reader" target="definitions"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e3" value="Plans with" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="service" target="definitions"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e4" value="Calls concurrently" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="service" target="lmclient"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e5" value="Binds" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="options" target="service"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e6" value="Binds" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="options" target="lmclient"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e7" value="Coordinates producer/consumer" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="service" target="channel"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e8" value="Queries and transacts" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=open" edge="1" parent="1" source="service" target="context"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e9" value="Tracks" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=diamond;endFill=0" edge="1" parent="1" source="context" target="run"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e10" value="Tracks" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=diamond;endFill=0" edge="1" parent="1" source="context" target="item"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="e11" value="Owns ordered items" style="edgeStyle=orthogonalEdgeStyle;html=1;endArrow=diamond;endFill=1" edge="1" parent="1" source="run" target="item"><mxGeometry relative="1" as="geometry"/></mxCell>
|
|
<mxCell id="note" value="Plan order: category positive pass, then negative pass. Workers may finish out of order; persistence waits for the next contiguous ordinal and commits rows plus checkpoint atomically." style="shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=12" vertex="1" parent="1">
|
|
<mxGeometry x="1080" y="560" width="430" height="120" as="geometry"/>
|
|
</mxCell>
|
|
</root>
|
|
</mxGraphModel>
|
|
</diagram>
|
|
</mxfile>
|