Spaces:
Running
Running
Some more mock-ups for ODE-GNN demo.
Browse files
examples/ODE-GNN
CHANGED
|
@@ -77,20 +77,6 @@
|
|
| 77 |
"target": "Concatenate 1",
|
| 78 |
"targetHandle": "b"
|
| 79 |
},
|
| 80 |
-
{
|
| 81 |
-
"id": "Concatenate 1 Neural ODE 1",
|
| 82 |
-
"source": "Concatenate 1",
|
| 83 |
-
"sourceHandle": "x",
|
| 84 |
-
"target": "Neural ODE 1",
|
| 85 |
-
"targetHandle": "x"
|
| 86 |
-
},
|
| 87 |
-
{
|
| 88 |
-
"id": "Neural ODE 1 MSE loss 1",
|
| 89 |
-
"source": "Neural ODE 1",
|
| 90 |
-
"sourceHandle": "x",
|
| 91 |
-
"target": "MSE loss 1",
|
| 92 |
-
"targetHandle": "x"
|
| 93 |
-
},
|
| 94 |
{
|
| 95 |
"id": "Input: label 1 MSE loss 1",
|
| 96 |
"source": "Input: label 1",
|
|
@@ -104,6 +90,20 @@
|
|
| 104 |
"sourceHandle": "loss",
|
| 105 |
"target": "Optimizer 1",
|
| 106 |
"targetHandle": "loss"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
],
|
| 109 |
"env": "PyTorch model",
|
|
@@ -165,7 +165,7 @@
|
|
| 165 |
"height": 200.0,
|
| 166 |
"id": "Graph conv 1",
|
| 167 |
"position": {
|
| 168 |
-
"x":
|
| 169 |
"y": 195.0
|
| 170 |
},
|
| 171 |
"type": "basic",
|
|
@@ -173,6 +173,8 @@
|
|
| 173 |
},
|
| 174 |
{
|
| 175 |
"data": {
|
|
|
|
|
|
|
| 176 |
"display": null,
|
| 177 |
"error": null,
|
| 178 |
"meta": {
|
|
@@ -207,7 +209,7 @@
|
|
| 207 |
"type": "basic"
|
| 208 |
},
|
| 209 |
"params": {
|
| 210 |
-
"times":
|
| 211 |
},
|
| 212 |
"status": "planned",
|
| 213 |
"title": "Repeat"
|
|
@@ -568,49 +570,6 @@
|
|
| 568 |
"type": "basic",
|
| 569 |
"width": 200.0
|
| 570 |
},
|
| 571 |
-
{
|
| 572 |
-
"data": {
|
| 573 |
-
"__execution_delay": null,
|
| 574 |
-
"collapsed": true,
|
| 575 |
-
"display": null,
|
| 576 |
-
"error": null,
|
| 577 |
-
"meta": {
|
| 578 |
-
"inputs": {
|
| 579 |
-
"x": {
|
| 580 |
-
"name": "x",
|
| 581 |
-
"position": "bottom",
|
| 582 |
-
"type": {
|
| 583 |
-
"type": "tensor"
|
| 584 |
-
}
|
| 585 |
-
}
|
| 586 |
-
},
|
| 587 |
-
"name": "Neural ODE",
|
| 588 |
-
"outputs": {
|
| 589 |
-
"x": {
|
| 590 |
-
"name": "x",
|
| 591 |
-
"position": "top",
|
| 592 |
-
"type": {
|
| 593 |
-
"type": "tensor"
|
| 594 |
-
}
|
| 595 |
-
}
|
| 596 |
-
},
|
| 597 |
-
"params": {},
|
| 598 |
-
"type": "basic"
|
| 599 |
-
},
|
| 600 |
-
"params": {},
|
| 601 |
-
"status": "planned",
|
| 602 |
-
"title": "Neural ODE"
|
| 603 |
-
},
|
| 604 |
-
"dragHandle": ".bg-primary",
|
| 605 |
-
"height": 200.0,
|
| 606 |
-
"id": "Neural ODE 1",
|
| 607 |
-
"position": {
|
| 608 |
-
"x": 475.11029083619064,
|
| 609 |
-
"y": -633.1862788850791
|
| 610 |
-
},
|
| 611 |
-
"type": "basic",
|
| 612 |
-
"width": 200.0
|
| 613 |
-
},
|
| 614 |
{
|
| 615 |
"data": {
|
| 616 |
"__execution_delay": null,
|
|
@@ -645,10 +604,6 @@
|
|
| 645 |
}
|
| 646 |
},
|
| 647 |
"params": {},
|
| 648 |
-
"position": {
|
| 649 |
-
"x": 783.0,
|
| 650 |
-
"y": 101.0
|
| 651 |
-
},
|
| 652 |
"type": "basic"
|
| 653 |
},
|
| 654 |
"params": {},
|
|
@@ -684,10 +639,6 @@
|
|
| 684 |
}
|
| 685 |
},
|
| 686 |
"params": {},
|
| 687 |
-
"position": {
|
| 688 |
-
"x": 893.0,
|
| 689 |
-
"y": 369.0
|
| 690 |
-
},
|
| 691 |
"type": "basic"
|
| 692 |
},
|
| 693 |
"params": {},
|
|
@@ -729,7 +680,7 @@
|
|
| 729 |
}
|
| 730 |
},
|
| 731 |
"type": {
|
| 732 |
-
"default": 1
|
| 733 |
"name": "type",
|
| 734 |
"type": {
|
| 735 |
"enum": [
|
|
@@ -744,10 +695,6 @@
|
|
| 744 |
}
|
| 745 |
}
|
| 746 |
},
|
| 747 |
-
"position": {
|
| 748 |
-
"x": 986.0,
|
| 749 |
-
"y": 165.0
|
| 750 |
-
},
|
| 751 |
"type": "basic"
|
| 752 |
},
|
| 753 |
"params": {
|
|
@@ -766,6 +713,84 @@
|
|
| 766 |
},
|
| 767 |
"type": "basic",
|
| 768 |
"width": 190.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 769 |
}
|
| 770 |
]
|
| 771 |
}
|
|
|
|
| 77 |
"target": "Concatenate 1",
|
| 78 |
"targetHandle": "b"
|
| 79 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
{
|
| 81 |
"id": "Input: label 1 MSE loss 1",
|
| 82 |
"source": "Input: label 1",
|
|
|
|
| 90 |
"sourceHandle": "loss",
|
| 91 |
"target": "Optimizer 1",
|
| 92 |
"targetHandle": "loss"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"id": "Concatenate 1 Neural ODE 2",
|
| 96 |
+
"source": "Concatenate 1",
|
| 97 |
+
"sourceHandle": "x",
|
| 98 |
+
"target": "Neural ODE 2",
|
| 99 |
+
"targetHandle": "x"
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"id": "Neural ODE 2 MSE loss 1",
|
| 103 |
+
"source": "Neural ODE 2",
|
| 104 |
+
"sourceHandle": "x",
|
| 105 |
+
"target": "MSE loss 1",
|
| 106 |
+
"targetHandle": "x"
|
| 107 |
}
|
| 108 |
],
|
| 109 |
"env": "PyTorch model",
|
|
|
|
| 165 |
"height": 200.0,
|
| 166 |
"id": "Graph conv 1",
|
| 167 |
"position": {
|
| 168 |
+
"x": 350.98078368755864,
|
| 169 |
"y": 195.0
|
| 170 |
},
|
| 171 |
"type": "basic",
|
|
|
|
| 173 |
},
|
| 174 |
{
|
| 175 |
"data": {
|
| 176 |
+
"__execution_delay": 0.0,
|
| 177 |
+
"collapsed": null,
|
| 178 |
"display": null,
|
| 179 |
"error": null,
|
| 180 |
"meta": {
|
|
|
|
| 209 |
"type": "basic"
|
| 210 |
},
|
| 211 |
"params": {
|
| 212 |
+
"times": "5"
|
| 213 |
},
|
| 214 |
"status": "planned",
|
| 215 |
"title": "Repeat"
|
|
|
|
| 570 |
"type": "basic",
|
| 571 |
"width": 200.0
|
| 572 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 573 |
{
|
| 574 |
"data": {
|
| 575 |
"__execution_delay": null,
|
|
|
|
| 604 |
}
|
| 605 |
},
|
| 606 |
"params": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 607 |
"type": "basic"
|
| 608 |
},
|
| 609 |
"params": {},
|
|
|
|
| 639 |
}
|
| 640 |
},
|
| 641 |
"params": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 642 |
"type": "basic"
|
| 643 |
},
|
| 644 |
"params": {},
|
|
|
|
| 680 |
}
|
| 681 |
},
|
| 682 |
"type": {
|
| 683 |
+
"default": "1",
|
| 684 |
"name": "type",
|
| 685 |
"type": {
|
| 686 |
"enum": [
|
|
|
|
| 695 |
}
|
| 696 |
}
|
| 697 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
| 698 |
"type": "basic"
|
| 699 |
},
|
| 700 |
"params": {
|
|
|
|
| 713 |
},
|
| 714 |
"type": "basic",
|
| 715 |
"width": 190.0
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"data": {
|
| 719 |
+
"display": null,
|
| 720 |
+
"error": null,
|
| 721 |
+
"meta": {
|
| 722 |
+
"inputs": {
|
| 723 |
+
"x": {
|
| 724 |
+
"name": "x",
|
| 725 |
+
"position": "bottom",
|
| 726 |
+
"type": {
|
| 727 |
+
"type": "tensor"
|
| 728 |
+
}
|
| 729 |
+
}
|
| 730 |
+
},
|
| 731 |
+
"name": "Neural ODE",
|
| 732 |
+
"outputs": {
|
| 733 |
+
"x": {
|
| 734 |
+
"name": "x",
|
| 735 |
+
"position": "top",
|
| 736 |
+
"type": {
|
| 737 |
+
"type": "tensor"
|
| 738 |
+
}
|
| 739 |
+
}
|
| 740 |
+
},
|
| 741 |
+
"params": {
|
| 742 |
+
"absolute_tolerance": {
|
| 743 |
+
"default": null,
|
| 744 |
+
"name": "absolute_tolerance",
|
| 745 |
+
"type": {
|
| 746 |
+
"type": "None"
|
| 747 |
+
}
|
| 748 |
+
},
|
| 749 |
+
"method": {
|
| 750 |
+
"default": "1",
|
| 751 |
+
"name": "method",
|
| 752 |
+
"type": {
|
| 753 |
+
"enum": [
|
| 754 |
+
"dopri8",
|
| 755 |
+
"dopri5",
|
| 756 |
+
"bosh3",
|
| 757 |
+
"fehlberg2",
|
| 758 |
+
"adaptive_heun",
|
| 759 |
+
"euler",
|
| 760 |
+
"midpoint",
|
| 761 |
+
"rk4",
|
| 762 |
+
"explicit_adams",
|
| 763 |
+
"implicit_adams"
|
| 764 |
+
]
|
| 765 |
+
}
|
| 766 |
+
},
|
| 767 |
+
"relative_tolerance": {
|
| 768 |
+
"default": null,
|
| 769 |
+
"name": "relative_tolerance",
|
| 770 |
+
"type": {
|
| 771 |
+
"type": "None"
|
| 772 |
+
}
|
| 773 |
+
}
|
| 774 |
+
},
|
| 775 |
+
"type": "basic"
|
| 776 |
+
},
|
| 777 |
+
"params": {
|
| 778 |
+
"absolute_tolerance": null,
|
| 779 |
+
"method": 1.0,
|
| 780 |
+
"relative_tolerance": null
|
| 781 |
+
},
|
| 782 |
+
"status": "planned",
|
| 783 |
+
"title": "Neural ODE"
|
| 784 |
+
},
|
| 785 |
+
"dragHandle": ".bg-primary",
|
| 786 |
+
"height": 200.0,
|
| 787 |
+
"id": "Neural ODE 2",
|
| 788 |
+
"position": {
|
| 789 |
+
"x": 342.3226409443945,
|
| 790 |
+
"y": -687.1882072175634
|
| 791 |
+
},
|
| 792 |
+
"type": "basic",
|
| 793 |
+
"width": 200.0
|
| 794 |
}
|
| 795 |
]
|
| 796 |
}
|
examples/Using a model
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"edges": [
|
| 3 |
+
{
|
| 4 |
+
"id": "Import CSV 1 Train/test split 1",
|
| 5 |
+
"source": "Import CSV 1",
|
| 6 |
+
"sourceHandle": "output",
|
| 7 |
+
"target": "Train/test split 1",
|
| 8 |
+
"targetHandle": "bundle"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"id": "Train/test split 1 Create graph 1",
|
| 12 |
+
"source": "Train/test split 1",
|
| 13 |
+
"sourceHandle": "output",
|
| 14 |
+
"target": "Create graph 1",
|
| 15 |
+
"targetHandle": "bundle"
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"id": "Biomedical foundation graph (PLACEHOLDER) 1 Create graph 1",
|
| 19 |
+
"source": "Biomedical foundation graph (PLACEHOLDER) 1",
|
| 20 |
+
"sourceHandle": "output",
|
| 21 |
+
"target": "Create graph 1",
|
| 22 |
+
"targetHandle": "bundle"
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"id": "Define model 1 Create graph 1",
|
| 26 |
+
"source": "Define model 1",
|
| 27 |
+
"sourceHandle": "output",
|
| 28 |
+
"target": "Create graph 1",
|
| 29 |
+
"targetHandle": "bundle"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"id": "Create graph 1 Train model 1",
|
| 33 |
+
"source": "Create graph 1",
|
| 34 |
+
"sourceHandle": "output",
|
| 35 |
+
"target": "Train model 1",
|
| 36 |
+
"targetHandle": "bundle"
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"id": "Train model 1 Model inference 1",
|
| 40 |
+
"source": "Train model 1",
|
| 41 |
+
"sourceHandle": "output",
|
| 42 |
+
"target": "Model inference 1",
|
| 43 |
+
"targetHandle": "bundle"
|
| 44 |
+
}
|
| 45 |
+
],
|
| 46 |
+
"env": "LynxKite Graph Analytics",
|
| 47 |
+
"nodes": [
|
| 48 |
+
{
|
| 49 |
+
"data": {
|
| 50 |
+
"__execution_delay": 0.0,
|
| 51 |
+
"collapsed": null,
|
| 52 |
+
"display": null,
|
| 53 |
+
"error": null,
|
| 54 |
+
"meta": {
|
| 55 |
+
"inputs": {},
|
| 56 |
+
"name": "Biomedical foundation graph (PLACEHOLDER)",
|
| 57 |
+
"outputs": {
|
| 58 |
+
"output": {
|
| 59 |
+
"name": "output",
|
| 60 |
+
"position": "right",
|
| 61 |
+
"type": {
|
| 62 |
+
"type": "None"
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
},
|
| 66 |
+
"params": {
|
| 67 |
+
"filter_nodes": {
|
| 68 |
+
"default": null,
|
| 69 |
+
"name": "filter_nodes",
|
| 70 |
+
"type": {
|
| 71 |
+
"type": "<class 'str'>"
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
},
|
| 75 |
+
"type": "basic"
|
| 76 |
+
},
|
| 77 |
+
"params": {
|
| 78 |
+
"filter_nodes": "drug,gene,disease"
|
| 79 |
+
},
|
| 80 |
+
"status": "done",
|
| 81 |
+
"title": "Biomedical foundation graph (PLACEHOLDER)"
|
| 82 |
+
},
|
| 83 |
+
"dragHandle": ".bg-primary",
|
| 84 |
+
"height": 200.0,
|
| 85 |
+
"id": "Biomedical foundation graph (PLACEHOLDER) 1",
|
| 86 |
+
"position": {
|
| 87 |
+
"x": 230.1082040835347,
|
| 88 |
+
"y": 643.2454063689602
|
| 89 |
+
},
|
| 90 |
+
"type": "basic",
|
| 91 |
+
"width": 200.0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"data": {
|
| 95 |
+
"__execution_delay": null,
|
| 96 |
+
"collapsed": true,
|
| 97 |
+
"display": null,
|
| 98 |
+
"error": "Missing input: bundle",
|
| 99 |
+
"meta": {
|
| 100 |
+
"inputs": {
|
| 101 |
+
"bundle": {
|
| 102 |
+
"name": "bundle",
|
| 103 |
+
"position": "left",
|
| 104 |
+
"type": {
|
| 105 |
+
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
},
|
| 109 |
+
"name": "Train/test split",
|
| 110 |
+
"outputs": {
|
| 111 |
+
"output": {
|
| 112 |
+
"name": "output",
|
| 113 |
+
"position": "right",
|
| 114 |
+
"type": {
|
| 115 |
+
"type": "None"
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"params": {
|
| 120 |
+
"table_name": {
|
| 121 |
+
"default": null,
|
| 122 |
+
"name": "table_name",
|
| 123 |
+
"type": {
|
| 124 |
+
"type": "<class 'str'>"
|
| 125 |
+
}
|
| 126 |
+
},
|
| 127 |
+
"test_ratio": {
|
| 128 |
+
"default": 0.1,
|
| 129 |
+
"name": "test_ratio",
|
| 130 |
+
"type": {
|
| 131 |
+
"type": "<class 'float'>"
|
| 132 |
+
}
|
| 133 |
+
}
|
| 134 |
+
},
|
| 135 |
+
"type": "basic"
|
| 136 |
+
},
|
| 137 |
+
"params": {
|
| 138 |
+
"table_name": null,
|
| 139 |
+
"test_ratio": 0.1
|
| 140 |
+
},
|
| 141 |
+
"status": "planned",
|
| 142 |
+
"title": "Train/test split"
|
| 143 |
+
},
|
| 144 |
+
"dragHandle": ".bg-primary",
|
| 145 |
+
"height": 200.0,
|
| 146 |
+
"id": "Train/test split 1",
|
| 147 |
+
"position": {
|
| 148 |
+
"x": 313.3745540124723,
|
| 149 |
+
"y": 412.5466021460861
|
| 150 |
+
},
|
| 151 |
+
"type": "basic",
|
| 152 |
+
"width": 200.0
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"data": {
|
| 156 |
+
"display": null,
|
| 157 |
+
"error": "[Errno 2] No such file or directory: ''",
|
| 158 |
+
"meta": {
|
| 159 |
+
"inputs": {},
|
| 160 |
+
"name": "Import CSV",
|
| 161 |
+
"outputs": {
|
| 162 |
+
"output": {
|
| 163 |
+
"name": "output",
|
| 164 |
+
"position": "right",
|
| 165 |
+
"type": {
|
| 166 |
+
"type": "None"
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
},
|
| 170 |
+
"params": {
|
| 171 |
+
"columns": {
|
| 172 |
+
"default": "<from file>",
|
| 173 |
+
"name": "columns",
|
| 174 |
+
"type": {
|
| 175 |
+
"type": "<class 'str'>"
|
| 176 |
+
}
|
| 177 |
+
},
|
| 178 |
+
"filename": {
|
| 179 |
+
"default": null,
|
| 180 |
+
"name": "filename",
|
| 181 |
+
"type": {
|
| 182 |
+
"type": "<class 'str'>"
|
| 183 |
+
}
|
| 184 |
+
},
|
| 185 |
+
"separator": {
|
| 186 |
+
"default": "<auto>",
|
| 187 |
+
"name": "separator",
|
| 188 |
+
"type": {
|
| 189 |
+
"type": "<class 'str'>"
|
| 190 |
+
}
|
| 191 |
+
}
|
| 192 |
+
},
|
| 193 |
+
"type": "basic"
|
| 194 |
+
},
|
| 195 |
+
"params": {
|
| 196 |
+
"columns": "<from file>",
|
| 197 |
+
"filename": null,
|
| 198 |
+
"separator": "<auto>"
|
| 199 |
+
},
|
| 200 |
+
"status": "done",
|
| 201 |
+
"title": "Import CSV"
|
| 202 |
+
},
|
| 203 |
+
"dragHandle": ".bg-primary",
|
| 204 |
+
"height": 200.0,
|
| 205 |
+
"id": "Import CSV 1",
|
| 206 |
+
"position": {
|
| 207 |
+
"x": -2.1743215714344757,
|
| 208 |
+
"y": 346.06014722935214
|
| 209 |
+
},
|
| 210 |
+
"type": "basic",
|
| 211 |
+
"width": 200.0
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"data": {
|
| 215 |
+
"__execution_delay": 0.0,
|
| 216 |
+
"collapsed": null,
|
| 217 |
+
"display": null,
|
| 218 |
+
"error": "Missing input: bundle",
|
| 219 |
+
"meta": {
|
| 220 |
+
"inputs": {
|
| 221 |
+
"bundle": {
|
| 222 |
+
"name": "bundle",
|
| 223 |
+
"position": "left",
|
| 224 |
+
"type": {
|
| 225 |
+
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
|
| 226 |
+
}
|
| 227 |
+
}
|
| 228 |
+
},
|
| 229 |
+
"name": "Model inference",
|
| 230 |
+
"outputs": {
|
| 231 |
+
"output": {
|
| 232 |
+
"name": "output",
|
| 233 |
+
"position": "right",
|
| 234 |
+
"type": {
|
| 235 |
+
"type": "None"
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
},
|
| 239 |
+
"params": {
|
| 240 |
+
"model_mapping": {
|
| 241 |
+
"default": null,
|
| 242 |
+
"name": "model_mapping",
|
| 243 |
+
"type": {
|
| 244 |
+
"type": "<class 'str'>"
|
| 245 |
+
}
|
| 246 |
+
},
|
| 247 |
+
"model_name": {
|
| 248 |
+
"default": null,
|
| 249 |
+
"name": "model_name",
|
| 250 |
+
"type": {
|
| 251 |
+
"type": "<class 'str'>"
|
| 252 |
+
}
|
| 253 |
+
},
|
| 254 |
+
"save_output_as": {
|
| 255 |
+
"default": "prediction",
|
| 256 |
+
"name": "save_output_as",
|
| 257 |
+
"type": {
|
| 258 |
+
"type": "<class 'str'>"
|
| 259 |
+
}
|
| 260 |
+
}
|
| 261 |
+
},
|
| 262 |
+
"type": "basic"
|
| 263 |
+
},
|
| 264 |
+
"params": {
|
| 265 |
+
"model_mapping": "input: data_test",
|
| 266 |
+
"model_name": "model",
|
| 267 |
+
"save_output_as": "prediction"
|
| 268 |
+
},
|
| 269 |
+
"status": "done",
|
| 270 |
+
"title": "Model inference"
|
| 271 |
+
},
|
| 272 |
+
"dragHandle": ".bg-primary",
|
| 273 |
+
"height": 339.0,
|
| 274 |
+
"id": "Model inference 1",
|
| 275 |
+
"position": {
|
| 276 |
+
"x": 1736.5697434242886,
|
| 277 |
+
"y": 357.0743204289906
|
| 278 |
+
},
|
| 279 |
+
"type": "basic",
|
| 280 |
+
"width": 281.0
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"data": {
|
| 284 |
+
"__execution_delay": null,
|
| 285 |
+
"collapsed": true,
|
| 286 |
+
"display": null,
|
| 287 |
+
"error": "Missing input: bundle",
|
| 288 |
+
"meta": {
|
| 289 |
+
"inputs": {
|
| 290 |
+
"bundle": {
|
| 291 |
+
"name": "bundle",
|
| 292 |
+
"position": "left",
|
| 293 |
+
"type": {
|
| 294 |
+
"type": "list[lynxkite_graph_analytics.core.Bundle]"
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
},
|
| 298 |
+
"name": "Create graph",
|
| 299 |
+
"outputs": {
|
| 300 |
+
"output": {
|
| 301 |
+
"name": "output",
|
| 302 |
+
"position": "right",
|
| 303 |
+
"type": {
|
| 304 |
+
"type": "None"
|
| 305 |
+
}
|
| 306 |
+
}
|
| 307 |
+
},
|
| 308 |
+
"params": {
|
| 309 |
+
"relations": {
|
| 310 |
+
"default": null,
|
| 311 |
+
"name": "relations",
|
| 312 |
+
"type": {
|
| 313 |
+
"type": "<class 'str'>"
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
},
|
| 317 |
+
"type": "graph_creation_view"
|
| 318 |
+
},
|
| 319 |
+
"params": {
|
| 320 |
+
"relations": null
|
| 321 |
+
},
|
| 322 |
+
"status": "planned",
|
| 323 |
+
"title": "Create graph"
|
| 324 |
+
},
|
| 325 |
+
"dragHandle": ".bg-primary",
|
| 326 |
+
"height": 322.0,
|
| 327 |
+
"id": "Create graph 1",
|
| 328 |
+
"position": {
|
| 329 |
+
"x": 846.6882598271658,
|
| 330 |
+
"y": 480.6258932907771
|
| 331 |
+
},
|
| 332 |
+
"type": "graph_creation_view",
|
| 333 |
+
"width": 313.0
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"data": {
|
| 337 |
+
"__execution_delay": 0.0,
|
| 338 |
+
"collapsed": null,
|
| 339 |
+
"display": null,
|
| 340 |
+
"error": null,
|
| 341 |
+
"meta": {
|
| 342 |
+
"inputs": {},
|
| 343 |
+
"name": "Define model",
|
| 344 |
+
"outputs": {
|
| 345 |
+
"output": {
|
| 346 |
+
"name": "output",
|
| 347 |
+
"position": "right",
|
| 348 |
+
"type": {
|
| 349 |
+
"type": "None"
|
| 350 |
+
}
|
| 351 |
+
}
|
| 352 |
+
},
|
| 353 |
+
"params": {
|
| 354 |
+
"model_workspace": {
|
| 355 |
+
"default": null,
|
| 356 |
+
"name": "model_workspace",
|
| 357 |
+
"type": {
|
| 358 |
+
"type": "<class 'str'>"
|
| 359 |
+
}
|
| 360 |
+
},
|
| 361 |
+
"save_as": {
|
| 362 |
+
"default": "model",
|
| 363 |
+
"name": "save_as",
|
| 364 |
+
"type": {
|
| 365 |
+
"type": "<class 'str'>"
|
| 366 |
+
}
|
| 367 |
+
}
|
| 368 |
+
},
|
| 369 |
+
"position": {
|
| 370 |
+
"x": 286.0,
|
| 371 |
+
"y": 208.0
|
| 372 |
+
},
|
| 373 |
+
"type": "basic"
|
| 374 |
+
},
|
| 375 |
+
"params": {
|
| 376 |
+
"model_workspace": "ODE-GNN",
|
| 377 |
+
"save_as": "model"
|
| 378 |
+
},
|
| 379 |
+
"status": "done",
|
| 380 |
+
"title": "Define model"
|
| 381 |
+
},
|
| 382 |
+
"dragHandle": ".bg-primary",
|
| 383 |
+
"height": 200.0,
|
| 384 |
+
"id": "Define model 1",
|
| 385 |
+
"position": {
|
| 386 |
+
"x": 311.976524267066,
|
| 387 |
+
"y": 146.99006795914332
|
| 388 |
+
},
|
| 389 |
+
"type": "basic",
|
| 390 |
+
"width": 200.0
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"data": {
|
| 394 |
+
"__execution_delay": 0.0,
|
| 395 |
+
"collapsed": null,
|
| 396 |
+
"display": null,
|
| 397 |
+
"error": "Missing input: bundle",
|
| 398 |
+
"meta": {
|
| 399 |
+
"inputs": {
|
| 400 |
+
"bundle": {
|
| 401 |
+
"name": "bundle",
|
| 402 |
+
"position": "left",
|
| 403 |
+
"type": {
|
| 404 |
+
"type": "<class 'lynxkite_graph_analytics.core.Bundle'>"
|
| 405 |
+
}
|
| 406 |
+
}
|
| 407 |
+
},
|
| 408 |
+
"name": "Train model",
|
| 409 |
+
"outputs": {
|
| 410 |
+
"output": {
|
| 411 |
+
"name": "output",
|
| 412 |
+
"position": "right",
|
| 413 |
+
"type": {
|
| 414 |
+
"type": "None"
|
| 415 |
+
}
|
| 416 |
+
}
|
| 417 |
+
},
|
| 418 |
+
"params": {
|
| 419 |
+
"epochs": {
|
| 420 |
+
"default": 1.0,
|
| 421 |
+
"name": "epochs",
|
| 422 |
+
"type": {
|
| 423 |
+
"type": "<class 'int'>"
|
| 424 |
+
}
|
| 425 |
+
},
|
| 426 |
+
"model_mapping": {
|
| 427 |
+
"default": null,
|
| 428 |
+
"name": "model_mapping",
|
| 429 |
+
"type": {
|
| 430 |
+
"type": "<class 'str'>"
|
| 431 |
+
}
|
| 432 |
+
},
|
| 433 |
+
"model_name": {
|
| 434 |
+
"default": null,
|
| 435 |
+
"name": "model_name",
|
| 436 |
+
"type": {
|
| 437 |
+
"type": "<class 'str'>"
|
| 438 |
+
}
|
| 439 |
+
}
|
| 440 |
+
},
|
| 441 |
+
"position": {
|
| 442 |
+
"x": 995.0,
|
| 443 |
+
"y": 350.0
|
| 444 |
+
},
|
| 445 |
+
"type": "basic"
|
| 446 |
+
},
|
| 447 |
+
"params": {
|
| 448 |
+
"epochs": 1.0,
|
| 449 |
+
"model_mapping": "input: data_train",
|
| 450 |
+
"model_name": "model"
|
| 451 |
+
},
|
| 452 |
+
"status": "planned",
|
| 453 |
+
"title": "Train model"
|
| 454 |
+
},
|
| 455 |
+
"dragHandle": ".bg-primary",
|
| 456 |
+
"height": 342.0,
|
| 457 |
+
"id": "Train model 1",
|
| 458 |
+
"position": {
|
| 459 |
+
"x": 1358.7213662492159,
|
| 460 |
+
"y": 352.03096133771896
|
| 461 |
+
},
|
| 462 |
+
"type": "basic",
|
| 463 |
+
"width": 296.0
|
| 464 |
+
}
|
| 465 |
+
]
|
| 466 |
+
}
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/lynxkite_ops.py
CHANGED
|
@@ -342,3 +342,41 @@ def create_graph(bundle: core.Bundle, *, relations: str = None) -> core.Bundle:
|
|
| 342 |
core.RelationDefinition(**r) for r in json.loads(relations).values()
|
| 343 |
]
|
| 344 |
return ops.Result(output=bundle, display=bundle.to_dict(limit=100))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
core.RelationDefinition(**r) for r in json.loads(relations).values()
|
| 343 |
]
|
| 344 |
return ops.Result(output=bundle, display=bundle.to_dict(limit=100))
|
| 345 |
+
|
| 346 |
+
|
| 347 |
+
@op("Define model")
|
| 348 |
+
def define_model(*, model_workspace: str, save_as: str = "model"):
|
| 349 |
+
"""Reads a PyTorch model workspace and returns it as a model in a bundle."""
|
| 350 |
+
return None
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
@op("Biomedical foundation graph (PLACEHOLDER)")
|
| 354 |
+
def biomedical_foundation_graph(*, filter_nodes: str):
|
| 355 |
+
"""Loads the gigantic Lynx-maintained knowledge graph. Includes drugs, diseases, genes, proteins, etc."""
|
| 356 |
+
return None
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
@op("Train model")
|
| 360 |
+
def train_model(
|
| 361 |
+
bundle: core.Bundle, *, model_name: str, model_mapping: str, epochs: int = 1
|
| 362 |
+
):
|
| 363 |
+
"""Trains the selected model on the selected dataset. Most training parameters are set in the model definition."""
|
| 364 |
+
return None
|
| 365 |
+
|
| 366 |
+
|
| 367 |
+
@op("Model inference")
|
| 368 |
+
def model_inference(
|
| 369 |
+
bundle: core.Bundle,
|
| 370 |
+
*,
|
| 371 |
+
model_name: str,
|
| 372 |
+
model_mapping: str,
|
| 373 |
+
save_output_as: str = "prediction",
|
| 374 |
+
):
|
| 375 |
+
"""Executes a trained model."""
|
| 376 |
+
return None
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
@op("Train/test split")
|
| 380 |
+
def train_test_split(bundle: core.Bundle, *, table_name: str, test_ratio: float = 0.1):
|
| 381 |
+
"""Splits a dataframe in the bundle into separate "_train" and "_test" dataframes."""
|
| 382 |
+
return None
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/pytorch_model_ops.py
CHANGED
|
@@ -33,7 +33,29 @@ reg("Input: sequential", outputs=["y"])
|
|
| 33 |
reg("Input: zeros", outputs=["x"])
|
| 34 |
|
| 35 |
reg("LSTM", inputs=["x", "h"], outputs=["x", "h"])
|
| 36 |
-
reg(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
reg("Attention", inputs=["q", "k", "v"], outputs=["x", "weights"])
|
| 38 |
reg("LayerNorm", inputs=["x"])
|
| 39 |
reg("Dropout", inputs=["x"], params=[P.basic("p", 0.5)])
|
|
|
|
| 33 |
reg("Input: zeros", outputs=["x"])
|
| 34 |
|
| 35 |
reg("LSTM", inputs=["x", "h"], outputs=["x", "h"])
|
| 36 |
+
reg(
|
| 37 |
+
"Neural ODE",
|
| 38 |
+
inputs=["x"],
|
| 39 |
+
params=[
|
| 40 |
+
P.basic("relative_tolerance"),
|
| 41 |
+
P.basic("absolute_tolerance"),
|
| 42 |
+
P.options(
|
| 43 |
+
"method",
|
| 44 |
+
[
|
| 45 |
+
"dopri8",
|
| 46 |
+
"dopri5",
|
| 47 |
+
"bosh3",
|
| 48 |
+
"fehlberg2",
|
| 49 |
+
"adaptive_heun",
|
| 50 |
+
"euler",
|
| 51 |
+
"midpoint",
|
| 52 |
+
"rk4",
|
| 53 |
+
"explicit_adams",
|
| 54 |
+
"implicit_adams",
|
| 55 |
+
],
|
| 56 |
+
),
|
| 57 |
+
],
|
| 58 |
+
)
|
| 59 |
reg("Attention", inputs=["q", "k", "v"], outputs=["x", "weights"])
|
| 60 |
reg("LayerNorm", inputs=["x"])
|
| 61 |
reg("Dropout", inputs=["x"], params=[P.basic("p", 0.5)])
|