Refactor the code to make it comply with PEP-8 standards:Convert all class definitions to CamelCase style.
(issue 37)
This commit is contained in:
+76
-76
@@ -1,76 +1,76 @@
|
||||
<mxfile host="Electron" modified="2023-08-20T20:43:16.356Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.6.8 Chrome/114.0.5735.289 Electron/25.5.0 Safari/537.36" etag="kwtbDIrkPfCysRMj32zz" version="21.6.8" type="device">
|
||||
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||
<mxGraphModel dx="914" dy="806" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-37" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="340" y="345" width="290" height="105" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-36" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="90" y="345" width="250" height="105" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-1" value="local compute <br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="90" y="380" width="120" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-2" target="ia-fclrWNqMUroYMcw65-28">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-2" value="my device<br>&nbsp;compute <br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="210" y="380" width="120" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-3" value="service compute<br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="370" y="380" width="120" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-4" value="untruest compute<br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#fa6800;fontColor=#000000;strokeColor=#C73500;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="490" y="380" width="130" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-18" value="TaskParams:json" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="50" width="120" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-19" value="padding input:buffers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="130" width="120" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-22" value="Refer:Name Data" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;fontColor=#ffffff;strokeColor=#3700CC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="90" width="120" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-23" value="aios_kernel<br>(scheduler)" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="250" width="120" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-24" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-19" target="ia-fclrWNqMUroYMcw65-23">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="240" as="sourcePoint" />
|
||||
<mxPoint x="480" y="190" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-25" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-23" target="ia-fclrWNqMUroYMcw65-2">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="420" y="350" as="sourcePoint" />
|
||||
<mxPoint x="470" y="300" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-26" value="Owne Nodes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="90" y="345" width="100" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-27" value="Rental Nodes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="505" y="345" width="100" height="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-28" value="ResultParams:json" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="516" width="120" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-29" value="padding result:buffers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="596" width="120" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-30" value="Refer:Name Data" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;fontColor=#ffffff;strokeColor=#3700CC;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="280" y="556" width="120" height="40" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-34" value="有一些任务是可以分割的,这个既可以上层处理分割、合并。也可以由aios_kernel处理" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="450" y="80" width="170" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-35" value="调度器的核心是结合已知compute_node的状态,与Refer数据的距离,计算的成本,运行的速度等多种要素,选择一个compute_node完成计算任务。也可包含一定的迭代重试逻辑" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
||||
<mxGeometry x="450" y="240" width="170" height="70" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
||||
<mxGraphModel dx="711" dy="944" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0"/>
|
||||
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0"/>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-37" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="340" y="345" width="290" height="105" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-36" value="" style="rounded=0;whiteSpace=wrap;html=1;dashed=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="90" y="345" width="250" height="105" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-1" value="local compute <br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="90" y="380" width="120" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-2" target="ia-fclrWNqMUroYMcw65-28" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-2" value="my device<br>&nbsp;compute <br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#6d8764;fontColor=#ffffff;strokeColor=#3A5431;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="210" y="380" width="120" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-3" value="service compute<br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#e3c800;fontColor=#000000;strokeColor=#B09500;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="370" y="380" width="120" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-4" value="untruest compute<br>node" style="shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#fa6800;fontColor=#000000;strokeColor=#C73500;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="490" y="380" width="130" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-18" value="TaskParams:json" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="50" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-19" value="padding input:buffers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="130" width="120" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-22" value="Refer:Name Data" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;fontColor=#ffffff;strokeColor=#3700CC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="90" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-23" value="aios_kernel<br>(scheduler)" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="250" width="120" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-24" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-19" target="ia-fclrWNqMUroYMcw65-23" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="430" y="240" as="sourcePoint"/>
|
||||
<mxPoint x="480" y="190" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-25" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="ia-fclrWNqMUroYMcw65-23" target="ia-fclrWNqMUroYMcw65-2" edge="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="420" y="350" as="sourcePoint"/>
|
||||
<mxPoint x="470" y="300" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-26" value="Owne Nodes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="90" y="345" width="100" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-27" value="Rental Nodes" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="505" y="345" width="100" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-28" value="ResultParams:json" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="516" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-29" value="padding result:buffers" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="596" width="120" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-30" value="Refer:Name Data" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#6a00ff;fontColor=#ffffff;strokeColor=#3700CC;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="280" y="556" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-34" value="<br><span style="color: rgb(209, 213, 219); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, Ubuntu, Cantarell, &quot;Noto Sans&quot;, sans-serif, &quot;Helvetica Neue&quot;, Arial, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 16px;">Some tasks can be divided, and this can be handled either at the higher layer for splitting and merging, or by the aios_kernel.</span>" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=default;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="450" y="80" width="170" height="150" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="ia-fclrWNqMUroYMcw65-35" value="<span style="color: rgb(209, 213, 219); font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &quot;Segoe UI&quot;, Roboto, Ubuntu, Cantarell, &quot;Noto Sans&quot;, sans-serif, &quot;Helvetica Neue&quot;, Arial, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color Emoji&quot;; font-size: 16px;">The core of the scheduler is to select a compute_node to complete the computing task based on a variety of factors, such as the known status of the compute_node, the distance to the Refer data, the cost of computation, and the speed of operation. It can also include some iterative retry logic.</span>" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=default;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
|
||||
<mxGeometry x="450" y="470" width="200" height="250" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
Reference in New Issue
Block a user