Spaces:
Running
Running
Do not create our own query language after all.
Browse files- examples/Model use.lynxkite.json +152 -134
- lynxkite-app/web/package-lock.json +18 -0
- lynxkite-app/web/package.json +2 -0
- lynxkite-app/web/src/workspace/nodes/NodeParameter.tsx +8 -48
- lynxkite-graph-analytics/src/lynxkite_graph_analytics/core.py +20 -9
- lynxkite-graph-analytics/src/lynxkite_graph_analytics/ml_ops.py +2 -2
examples/Model use.lynxkite.json
CHANGED
|
@@ -129,7 +129,8 @@
|
|
| 129 |
"columns": [
|
| 130 |
"x",
|
| 131 |
"y"
|
| 132 |
-
]
|
|
|
|
| 133 |
}
|
| 134 |
},
|
| 135 |
"other": {},
|
|
@@ -171,10 +172,7 @@
|
|
| 171 |
"name": "table_name",
|
| 172 |
"type": {
|
| 173 |
"format": "dropdown",
|
| 174 |
-
"
|
| 175 |
-
"*",
|
| 176 |
-
"dataframes"
|
| 177 |
-
]
|
| 178 |
}
|
| 179 |
},
|
| 180 |
{
|
|
@@ -393,21 +391,24 @@
|
|
| 393 |
"columns": [
|
| 394 |
"x",
|
| 395 |
"y"
|
| 396 |
-
]
|
|
|
|
| 397 |
},
|
| 398 |
"df_test": {
|
| 399 |
"columns": [
|
| 400 |
"index",
|
| 401 |
"x",
|
| 402 |
"y"
|
| 403 |
-
]
|
|
|
|
| 404 |
},
|
| 405 |
"df_train": {
|
| 406 |
"columns": [
|
| 407 |
"index",
|
| 408 |
"x",
|
| 409 |
"y"
|
| 410 |
-
]
|
|
|
|
| 411 |
}
|
| 412 |
},
|
| 413 |
"other": {},
|
|
@@ -593,25 +594,29 @@
|
|
| 593 |
"columns": [
|
| 594 |
"x",
|
| 595 |
"y"
|
| 596 |
-
]
|
|
|
|
| 597 |
},
|
| 598 |
"df_test": {
|
| 599 |
"columns": [
|
| 600 |
"index",
|
| 601 |
"x",
|
| 602 |
"y"
|
| 603 |
-
]
|
|
|
|
| 604 |
},
|
| 605 |
"df_train": {
|
| 606 |
"columns": [
|
| 607 |
"index",
|
| 608 |
"x",
|
| 609 |
"y"
|
| 610 |
-
]
|
|
|
|
| 611 |
}
|
| 612 |
},
|
| 613 |
"other": {
|
| 614 |
"model": {
|
|
|
|
| 615 |
"model": {
|
| 616 |
"input_output_names": {
|
| 617 |
"Input__tensor_1_output": "X",
|
|
@@ -671,12 +676,7 @@
|
|
| 671 |
"name": "model_name",
|
| 672 |
"type": {
|
| 673 |
"format": "dropdown",
|
| 674 |
-
"
|
| 675 |
-
"metadata_filter_value": "model",
|
| 676 |
-
"metadata_path": [
|
| 677 |
-
"*",
|
| 678 |
-
"other"
|
| 679 |
-
]
|
| 680 |
}
|
| 681 |
},
|
| 682 |
{
|
|
@@ -842,30 +842,35 @@
|
|
| 842 |
"columns": [
|
| 843 |
"x",
|
| 844 |
"y"
|
| 845 |
-
]
|
|
|
|
| 846 |
},
|
| 847 |
"df_test": {
|
| 848 |
"columns": [
|
| 849 |
"index",
|
| 850 |
"x",
|
| 851 |
"y"
|
| 852 |
-
]
|
|
|
|
| 853 |
},
|
| 854 |
"df_train": {
|
| 855 |
"columns": [
|
| 856 |
"index",
|
| 857 |
"x",
|
| 858 |
"y"
|
| 859 |
-
]
|
|
|
|
| 860 |
},
|
| 861 |
"training": {
|
| 862 |
"columns": [
|
| 863 |
"training_loss"
|
| 864 |
-
]
|
|
|
|
| 865 |
}
|
| 866 |
},
|
| 867 |
"other": {
|
| 868 |
"model": {
|
|
|
|
| 869 |
"model": {
|
| 870 |
"input_output_names": {
|
| 871 |
"Input__tensor_1_output": "X",
|
|
@@ -925,12 +930,7 @@
|
|
| 925 |
"name": "model_name",
|
| 926 |
"type": {
|
| 927 |
"format": "dropdown",
|
| 928 |
-
"
|
| 929 |
-
"metadata_filter_value": "model",
|
| 930 |
-
"metadata_path": [
|
| 931 |
-
"*",
|
| 932 |
-
"other"
|
| 933 |
-
]
|
| 934 |
}
|
| 935 |
},
|
| 936 |
{
|
|
@@ -1606,30 +1606,35 @@
|
|
| 1606 |
"columns": [
|
| 1607 |
"x",
|
| 1608 |
"y"
|
| 1609 |
-
]
|
|
|
|
| 1610 |
},
|
| 1611 |
"df_test": {
|
| 1612 |
"columns": [
|
| 1613 |
"index",
|
| 1614 |
"x",
|
| 1615 |
"y"
|
| 1616 |
-
]
|
|
|
|
| 1617 |
},
|
| 1618 |
"df_train": {
|
| 1619 |
"columns": [
|
| 1620 |
"index",
|
| 1621 |
"x",
|
| 1622 |
"y"
|
| 1623 |
-
]
|
|
|
|
| 1624 |
},
|
| 1625 |
"training": {
|
| 1626 |
"columns": [
|
| 1627 |
"training_loss"
|
| 1628 |
-
]
|
|
|
|
| 1629 |
}
|
| 1630 |
},
|
| 1631 |
"other": {
|
| 1632 |
"model": {
|
|
|
|
| 1633 |
"model": {
|
| 1634 |
"input_output_names": {
|
| 1635 |
"Input__tensor_1_output": "X",
|
|
@@ -2702,7 +2707,8 @@
|
|
| 2702 |
"columns": [
|
| 2703 |
"x",
|
| 2704 |
"y"
|
| 2705 |
-
]
|
|
|
|
| 2706 |
},
|
| 2707 |
"df_test": {
|
| 2708 |
"columns": [
|
|
@@ -2710,23 +2716,27 @@
|
|
| 2710 |
"pred",
|
| 2711 |
"x",
|
| 2712 |
"y"
|
| 2713 |
-
]
|
|
|
|
| 2714 |
},
|
| 2715 |
"df_train": {
|
| 2716 |
"columns": [
|
| 2717 |
"index",
|
| 2718 |
"x",
|
| 2719 |
"y"
|
| 2720 |
-
]
|
|
|
|
| 2721 |
},
|
| 2722 |
"training": {
|
| 2723 |
"columns": [
|
| 2724 |
"training_loss"
|
| 2725 |
-
]
|
|
|
|
| 2726 |
}
|
| 2727 |
},
|
| 2728 |
"other": {
|
| 2729 |
"model": {
|
|
|
|
| 2730 |
"model": {
|
| 2731 |
"input_output_names": {
|
| 2732 |
"Input__tensor_1_output": "X",
|
|
@@ -2807,184 +2817,184 @@
|
|
| 2807 |
{
|
| 2808 |
"data": [
|
| 2809 |
[
|
| 2810 |
-
|
| 2811 |
-
|
| 2812 |
"",
|
| 2813 |
-
|
| 2814 |
],
|
| 2815 |
[
|
| 2816 |
-
|
| 2817 |
-
|
| 2818 |
"",
|
| 2819 |
-
|
| 2820 |
],
|
| 2821 |
[
|
| 2822 |
-
|
| 2823 |
-
|
| 2824 |
"",
|
| 2825 |
-
|
| 2826 |
],
|
| 2827 |
[
|
| 2828 |
-
|
| 2829 |
-
|
| 2830 |
"",
|
| 2831 |
-
|
| 2832 |
],
|
| 2833 |
[
|
| 2834 |
-
|
| 2835 |
-
|
| 2836 |
"",
|
| 2837 |
-
|
| 2838 |
],
|
| 2839 |
[
|
| 2840 |
-
|
| 2841 |
-
|
| 2842 |
"",
|
| 2843 |
-
|
| 2844 |
],
|
| 2845 |
[
|
| 2846 |
-
|
| 2847 |
-
|
| 2848 |
"",
|
| 2849 |
-
|
| 2850 |
],
|
| 2851 |
[
|
| 2852 |
-
|
| 2853 |
-
|
| 2854 |
"",
|
| 2855 |
-
|
| 2856 |
],
|
| 2857 |
[
|
| 2858 |
-
|
| 2859 |
-
|
| 2860 |
"",
|
| 2861 |
-
|
| 2862 |
],
|
| 2863 |
[
|
| 2864 |
-
|
| 2865 |
-
|
| 2866 |
"",
|
| 2867 |
-
|
| 2868 |
],
|
| 2869 |
[
|
| 2870 |
-
|
| 2871 |
-
|
| 2872 |
"",
|
| 2873 |
-
|
| 2874 |
],
|
| 2875 |
[
|
| 2876 |
-
|
| 2877 |
-
|
| 2878 |
"",
|
| 2879 |
-
|
| 2880 |
],
|
| 2881 |
[
|
| 2882 |
-
|
| 2883 |
-
|
| 2884 |
"",
|
| 2885 |
-
|
| 2886 |
],
|
| 2887 |
[
|
| 2888 |
-
|
| 2889 |
-
|
| 2890 |
"",
|
| 2891 |
-
|
| 2892 |
],
|
| 2893 |
[
|
| 2894 |
-
|
| 2895 |
-
|
| 2896 |
"",
|
| 2897 |
-
|
| 2898 |
],
|
| 2899 |
[
|
| 2900 |
-
|
| 2901 |
-
|
| 2902 |
"",
|
| 2903 |
-
|
| 2904 |
],
|
| 2905 |
[
|
| 2906 |
-
|
| 2907 |
-
|
| 2908 |
"",
|
| 2909 |
-
|
| 2910 |
],
|
| 2911 |
[
|
| 2912 |
-
|
| 2913 |
-
|
| 2914 |
"",
|
| 2915 |
-
|
| 2916 |
],
|
| 2917 |
[
|
| 2918 |
-
|
| 2919 |
-
|
| 2920 |
"",
|
| 2921 |
-
|
| 2922 |
],
|
| 2923 |
[
|
| 2924 |
-
|
| 2925 |
-
|
| 2926 |
"",
|
| 2927 |
-
|
| 2928 |
],
|
| 2929 |
[
|
| 2930 |
-
|
| 2931 |
-
|
| 2932 |
"",
|
| 2933 |
-
|
| 2934 |
],
|
| 2935 |
[
|
| 2936 |
-
|
| 2937 |
-
|
| 2938 |
"",
|
| 2939 |
-
|
| 2940 |
],
|
| 2941 |
[
|
| 2942 |
-
|
| 2943 |
-
|
| 2944 |
"",
|
| 2945 |
-
|
| 2946 |
],
|
| 2947 |
[
|
| 2948 |
-
|
| 2949 |
-
|
| 2950 |
"",
|
| 2951 |
-
|
| 2952 |
],
|
| 2953 |
[
|
| 2954 |
-
|
| 2955 |
-
|
| 2956 |
"",
|
| 2957 |
-
|
| 2958 |
],
|
| 2959 |
[
|
| 2960 |
-
|
| 2961 |
-
|
| 2962 |
"",
|
| 2963 |
-
|
| 2964 |
],
|
| 2965 |
[
|
| 2966 |
-
|
| 2967 |
-
|
| 2968 |
"",
|
| 2969 |
-
|
| 2970 |
],
|
| 2971 |
[
|
| 2972 |
-
|
| 2973 |
-
|
| 2974 |
"",
|
| 2975 |
-
|
| 2976 |
],
|
| 2977 |
[
|
| 2978 |
-
|
| 2979 |
-
|
| 2980 |
"",
|
| 2981 |
-
|
| 2982 |
],
|
| 2983 |
[
|
| 2984 |
-
|
| 2985 |
-
|
| 2986 |
"",
|
| 2987 |
-
|
| 2988 |
]
|
| 2989 |
],
|
| 2990 |
"symbolSize": 25.65378780242026,
|
|
@@ -3014,8 +3024,8 @@
|
|
| 3014 |
"#FDE725"
|
| 3015 |
]
|
| 3016 |
},
|
| 3017 |
-
"max":
|
| 3018 |
-
"min":
|
| 3019 |
"right": 10,
|
| 3020 |
"top": "center"
|
| 3021 |
},
|
|
@@ -3038,7 +3048,8 @@
|
|
| 3038 |
"columns": [
|
| 3039 |
"x",
|
| 3040 |
"y"
|
| 3041 |
-
]
|
|
|
|
| 3042 |
},
|
| 3043 |
"df_test": {
|
| 3044 |
"columns": [
|
|
@@ -3046,23 +3057,27 @@
|
|
| 3046 |
"pred",
|
| 3047 |
"x",
|
| 3048 |
"y"
|
| 3049 |
-
]
|
|
|
|
| 3050 |
},
|
| 3051 |
"df_train": {
|
| 3052 |
"columns": [
|
| 3053 |
"index",
|
| 3054 |
"x",
|
| 3055 |
"y"
|
| 3056 |
-
]
|
|
|
|
| 3057 |
},
|
| 3058 |
"training": {
|
| 3059 |
"columns": [
|
| 3060 |
"training_loss"
|
| 3061 |
-
]
|
|
|
|
| 3062 |
}
|
| 3063 |
},
|
| 3064 |
"other": {
|
| 3065 |
"model": {
|
|
|
|
| 3066 |
"model": {
|
| 3067 |
"input_output_names": {
|
| 3068 |
"Input__tensor_1_output": "X",
|
|
@@ -3108,21 +3123,24 @@
|
|
| 3108 |
"default": "nodes",
|
| 3109 |
"name": "table_name",
|
| 3110 |
"type": {
|
| 3111 |
-
"
|
|
|
|
| 3112 |
}
|
| 3113 |
},
|
| 3114 |
{
|
| 3115 |
"default": "",
|
| 3116 |
"name": "vector_column",
|
| 3117 |
"type": {
|
| 3118 |
-
"
|
|
|
|
| 3119 |
}
|
| 3120 |
},
|
| 3121 |
{
|
| 3122 |
"default": "",
|
| 3123 |
"name": "label_column",
|
| 3124 |
"type": {
|
| 3125 |
-
"
|
|
|
|
| 3126 |
}
|
| 3127 |
},
|
| 3128 |
{
|
|
|
|
| 129 |
"columns": [
|
| 130 |
"x",
|
| 131 |
"y"
|
| 132 |
+
],
|
| 133 |
+
"key": "df"
|
| 134 |
}
|
| 135 |
},
|
| 136 |
"other": {},
|
|
|
|
| 172 |
"name": "table_name",
|
| 173 |
"type": {
|
| 174 |
"format": "dropdown",
|
| 175 |
+
"metadata_query": "[].dataframes[].keys(@)[]"
|
|
|
|
|
|
|
|
|
|
| 176 |
}
|
| 177 |
},
|
| 178 |
{
|
|
|
|
| 391 |
"columns": [
|
| 392 |
"x",
|
| 393 |
"y"
|
| 394 |
+
],
|
| 395 |
+
"key": "df"
|
| 396 |
},
|
| 397 |
"df_test": {
|
| 398 |
"columns": [
|
| 399 |
"index",
|
| 400 |
"x",
|
| 401 |
"y"
|
| 402 |
+
],
|
| 403 |
+
"key": "df_test"
|
| 404 |
},
|
| 405 |
"df_train": {
|
| 406 |
"columns": [
|
| 407 |
"index",
|
| 408 |
"x",
|
| 409 |
"y"
|
| 410 |
+
],
|
| 411 |
+
"key": "df_train"
|
| 412 |
}
|
| 413 |
},
|
| 414 |
"other": {},
|
|
|
|
| 594 |
"columns": [
|
| 595 |
"x",
|
| 596 |
"y"
|
| 597 |
+
],
|
| 598 |
+
"key": "df"
|
| 599 |
},
|
| 600 |
"df_test": {
|
| 601 |
"columns": [
|
| 602 |
"index",
|
| 603 |
"x",
|
| 604 |
"y"
|
| 605 |
+
],
|
| 606 |
+
"key": "df_test"
|
| 607 |
},
|
| 608 |
"df_train": {
|
| 609 |
"columns": [
|
| 610 |
"index",
|
| 611 |
"x",
|
| 612 |
"y"
|
| 613 |
+
],
|
| 614 |
+
"key": "df_train"
|
| 615 |
}
|
| 616 |
},
|
| 617 |
"other": {
|
| 618 |
"model": {
|
| 619 |
+
"key": "model",
|
| 620 |
"model": {
|
| 621 |
"input_output_names": {
|
| 622 |
"Input__tensor_1_output": "X",
|
|
|
|
| 676 |
"name": "model_name",
|
| 677 |
"type": {
|
| 678 |
"format": "dropdown",
|
| 679 |
+
"metadata_query": "[].other.*[] | [?type == 'model'].key"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 680 |
}
|
| 681 |
},
|
| 682 |
{
|
|
|
|
| 842 |
"columns": [
|
| 843 |
"x",
|
| 844 |
"y"
|
| 845 |
+
],
|
| 846 |
+
"key": "df"
|
| 847 |
},
|
| 848 |
"df_test": {
|
| 849 |
"columns": [
|
| 850 |
"index",
|
| 851 |
"x",
|
| 852 |
"y"
|
| 853 |
+
],
|
| 854 |
+
"key": "df_test"
|
| 855 |
},
|
| 856 |
"df_train": {
|
| 857 |
"columns": [
|
| 858 |
"index",
|
| 859 |
"x",
|
| 860 |
"y"
|
| 861 |
+
],
|
| 862 |
+
"key": "df_train"
|
| 863 |
},
|
| 864 |
"training": {
|
| 865 |
"columns": [
|
| 866 |
"training_loss"
|
| 867 |
+
],
|
| 868 |
+
"key": "training"
|
| 869 |
}
|
| 870 |
},
|
| 871 |
"other": {
|
| 872 |
"model": {
|
| 873 |
+
"key": "model",
|
| 874 |
"model": {
|
| 875 |
"input_output_names": {
|
| 876 |
"Input__tensor_1_output": "X",
|
|
|
|
| 930 |
"name": "model_name",
|
| 931 |
"type": {
|
| 932 |
"format": "dropdown",
|
| 933 |
+
"metadata_query": "[].other.*[] | [?type == 'model'].key"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 934 |
}
|
| 935 |
},
|
| 936 |
{
|
|
|
|
| 1606 |
"columns": [
|
| 1607 |
"x",
|
| 1608 |
"y"
|
| 1609 |
+
],
|
| 1610 |
+
"key": "df"
|
| 1611 |
},
|
| 1612 |
"df_test": {
|
| 1613 |
"columns": [
|
| 1614 |
"index",
|
| 1615 |
"x",
|
| 1616 |
"y"
|
| 1617 |
+
],
|
| 1618 |
+
"key": "df_test"
|
| 1619 |
},
|
| 1620 |
"df_train": {
|
| 1621 |
"columns": [
|
| 1622 |
"index",
|
| 1623 |
"x",
|
| 1624 |
"y"
|
| 1625 |
+
],
|
| 1626 |
+
"key": "df_train"
|
| 1627 |
},
|
| 1628 |
"training": {
|
| 1629 |
"columns": [
|
| 1630 |
"training_loss"
|
| 1631 |
+
],
|
| 1632 |
+
"key": "training"
|
| 1633 |
}
|
| 1634 |
},
|
| 1635 |
"other": {
|
| 1636 |
"model": {
|
| 1637 |
+
"key": "model",
|
| 1638 |
"model": {
|
| 1639 |
"input_output_names": {
|
| 1640 |
"Input__tensor_1_output": "X",
|
|
|
|
| 2707 |
"columns": [
|
| 2708 |
"x",
|
| 2709 |
"y"
|
| 2710 |
+
],
|
| 2711 |
+
"key": "df"
|
| 2712 |
},
|
| 2713 |
"df_test": {
|
| 2714 |
"columns": [
|
|
|
|
| 2716 |
"pred",
|
| 2717 |
"x",
|
| 2718 |
"y"
|
| 2719 |
+
],
|
| 2720 |
+
"key": "df_test"
|
| 2721 |
},
|
| 2722 |
"df_train": {
|
| 2723 |
"columns": [
|
| 2724 |
"index",
|
| 2725 |
"x",
|
| 2726 |
"y"
|
| 2727 |
+
],
|
| 2728 |
+
"key": "df_train"
|
| 2729 |
},
|
| 2730 |
"training": {
|
| 2731 |
"columns": [
|
| 2732 |
"training_loss"
|
| 2733 |
+
],
|
| 2734 |
+
"key": "training"
|
| 2735 |
}
|
| 2736 |
},
|
| 2737 |
"other": {
|
| 2738 |
"model": {
|
| 2739 |
+
"key": "model",
|
| 2740 |
"model": {
|
| 2741 |
"input_output_names": {
|
| 2742 |
"Input__tensor_1_output": "X",
|
|
|
|
| 2817 |
{
|
| 2818 |
"data": [
|
| 2819 |
[
|
| 2820 |
+
1.1259804964065552,
|
| 2821 |
+
5.3163533210754395,
|
| 2822 |
"",
|
| 2823 |
+
9.33173656463623
|
| 2824 |
],
|
| 2825 |
[
|
| 2826 |
+
0.8733923435211182,
|
| 2827 |
+
0.5778636932373047,
|
| 2828 |
"",
|
| 2829 |
+
19.34723663330078
|
| 2830 |
],
|
| 2831 |
[
|
| 2832 |
+
1.067949891090393,
|
| 2833 |
+
1.2907801866531372,
|
| 2834 |
"",
|
| 2835 |
+
20.190479278564453
|
| 2836 |
],
|
| 2837 |
[
|
| 2838 |
+
1.4413745403289795,
|
| 2839 |
+
0.5289837718009949,
|
| 2840 |
"",
|
| 2841 |
+
19.06584930419922
|
| 2842 |
],
|
| 2843 |
[
|
| 2844 |
+
0.6194189190864563,
|
| 2845 |
+
1.265136480331421,
|
| 2846 |
"",
|
| 2847 |
+
20.362045288085938
|
| 2848 |
],
|
| 2849 |
[
|
| 2850 |
+
1.2515668869018555,
|
| 2851 |
+
4.7913312911987305,
|
| 2852 |
"",
|
| 2853 |
+
8.057446479797363
|
| 2854 |
],
|
| 2855 |
[
|
| 2856 |
+
-0.20645830035209656,
|
| 2857 |
+
4.6087422370910645,
|
| 2858 |
"",
|
| 2859 |
+
10.770417213439941
|
| 2860 |
],
|
| 2861 |
[
|
| 2862 |
+
0.8678598999977112,
|
| 2863 |
+
3.810476541519165,
|
| 2864 |
"",
|
| 2865 |
+
8.457158088684082
|
| 2866 |
],
|
| 2867 |
[
|
| 2868 |
+
1.6636368036270142,
|
| 2869 |
+
4.523313522338867,
|
| 2870 |
"",
|
| 2871 |
+
8.167683601379395
|
| 2872 |
],
|
| 2873 |
[
|
| 2874 |
+
1.5554659366607666,
|
| 2875 |
+
0.131289541721344,
|
| 2876 |
"",
|
| 2877 |
+
18.83956527709961
|
| 2878 |
],
|
| 2879 |
[
|
| 2880 |
+
0.660535454750061,
|
| 2881 |
+
3.5511350631713867,
|
| 2882 |
"",
|
| 2883 |
+
8.917879104614258
|
| 2884 |
],
|
| 2885 |
[
|
| 2886 |
+
0.289438933134079,
|
| 2887 |
+
2.8580000400543213,
|
| 2888 |
"",
|
| 2889 |
+
9.801031112670898
|
| 2890 |
],
|
| 2891 |
[
|
| 2892 |
+
0.3500458598136902,
|
| 2893 |
+
2.201747417449951,
|
| 2894 |
"",
|
| 2895 |
+
21.30710792541504
|
| 2896 |
],
|
| 2897 |
[
|
| 2898 |
+
0.6661970019340515,
|
| 2899 |
+
0.7411483526229858,
|
| 2900 |
"",
|
| 2901 |
+
19.81875991821289
|
| 2902 |
],
|
| 2903 |
[
|
| 2904 |
+
-0.028679972514510155,
|
| 2905 |
+
4.847508430480957,
|
| 2906 |
"",
|
| 2907 |
+
10.324771881103516
|
| 2908 |
],
|
| 2909 |
[
|
| 2910 |
+
0.9988114833831787,
|
| 2911 |
+
-0.31374749541282654,
|
| 2912 |
"",
|
| 2913 |
+
18.43217658996582
|
| 2914 |
],
|
| 2915 |
[
|
| 2916 |
+
1.2578866481781006,
|
| 2917 |
+
-0.49167218804359436,
|
| 2918 |
"",
|
| 2919 |
+
17.98540687561035
|
| 2920 |
],
|
| 2921 |
[
|
| 2922 |
+
0.7829321026802063,
|
| 2923 |
+
5.131852626800537,
|
| 2924 |
"",
|
| 2925 |
+
7.504575252532959
|
| 2926 |
],
|
| 2927 |
[
|
| 2928 |
+
1.079374074935913,
|
| 2929 |
+
0.2569352090358734,
|
| 2930 |
"",
|
| 2931 |
+
19.47058868408203
|
| 2932 |
],
|
| 2933 |
[
|
| 2934 |
+
0.7425185441970825,
|
| 2935 |
+
1.9031448364257812,
|
| 2936 |
"",
|
| 2937 |
+
20.669689178466797
|
| 2938 |
],
|
| 2939 |
[
|
| 2940 |
+
1.1184741258621216,
|
| 2941 |
+
-0.8501556515693665,
|
| 2942 |
"",
|
| 2943 |
+
17.83696174621582
|
| 2944 |
],
|
| 2945 |
[
|
| 2946 |
+
1.5970081090927124,
|
| 2947 |
+
-1.0676954984664917,
|
| 2948 |
"",
|
| 2949 |
+
17.155776977539062
|
| 2950 |
],
|
| 2951 |
[
|
| 2952 |
+
0.6614332795143127,
|
| 2953 |
+
2.833474636077881,
|
| 2954 |
"",
|
| 2955 |
+
9.3106689453125
|
| 2956 |
],
|
| 2957 |
[
|
| 2958 |
+
1.811506986618042,
|
| 2959 |
+
-0.7138973474502563,
|
| 2960 |
"",
|
| 2961 |
+
17.416305541992188
|
| 2962 |
],
|
| 2963 |
[
|
| 2964 |
+
1.3115981817245483,
|
| 2965 |
+
4.23833703994751,
|
| 2966 |
"",
|
| 2967 |
+
8.467390060424805
|
| 2968 |
],
|
| 2969 |
[
|
| 2970 |
+
1.5368468761444092,
|
| 2971 |
+
5.071412563323975,
|
| 2972 |
"",
|
| 2973 |
+
7.690001010894775
|
| 2974 |
],
|
| 2975 |
[
|
| 2976 |
+
0.9306067228317261,
|
| 2977 |
+
4.39690637588501,
|
| 2978 |
"",
|
| 2979 |
+
8.620335578918457
|
| 2980 |
],
|
| 2981 |
[
|
| 2982 |
+
0.30367591977119446,
|
| 2983 |
+
4.658701419830322,
|
| 2984 |
"",
|
| 2985 |
+
10.502456665039062
|
| 2986 |
],
|
| 2987 |
[
|
| 2988 |
+
0.4010639190673828,
|
| 2989 |
+
1.674473762512207,
|
| 2990 |
"",
|
| 2991 |
+
20.892684936523438
|
| 2992 |
],
|
| 2993 |
[
|
| 2994 |
+
0.6275453567504883,
|
| 2995 |
+
-0.7735381126403809,
|
| 2996 |
"",
|
| 2997 |
+
18.215309143066406
|
| 2998 |
]
|
| 2999 |
],
|
| 3000 |
"symbolSize": 25.65378780242026,
|
|
|
|
| 3024 |
"#FDE725"
|
| 3025 |
]
|
| 3026 |
},
|
| 3027 |
+
"max": 21.30710792541504,
|
| 3028 |
+
"min": 7.504575252532959,
|
| 3029 |
"right": 10,
|
| 3030 |
"top": "center"
|
| 3031 |
},
|
|
|
|
| 3048 |
"columns": [
|
| 3049 |
"x",
|
| 3050 |
"y"
|
| 3051 |
+
],
|
| 3052 |
+
"key": "df"
|
| 3053 |
},
|
| 3054 |
"df_test": {
|
| 3055 |
"columns": [
|
|
|
|
| 3057 |
"pred",
|
| 3058 |
"x",
|
| 3059 |
"y"
|
| 3060 |
+
],
|
| 3061 |
+
"key": "df_test"
|
| 3062 |
},
|
| 3063 |
"df_train": {
|
| 3064 |
"columns": [
|
| 3065 |
"index",
|
| 3066 |
"x",
|
| 3067 |
"y"
|
| 3068 |
+
],
|
| 3069 |
+
"key": "df_train"
|
| 3070 |
},
|
| 3071 |
"training": {
|
| 3072 |
"columns": [
|
| 3073 |
"training_loss"
|
| 3074 |
+
],
|
| 3075 |
+
"key": "training"
|
| 3076 |
}
|
| 3077 |
},
|
| 3078 |
"other": {
|
| 3079 |
"model": {
|
| 3080 |
+
"key": "model",
|
| 3081 |
"model": {
|
| 3082 |
"input_output_names": {
|
| 3083 |
"Input__tensor_1_output": "X",
|
|
|
|
| 3123 |
"default": "nodes",
|
| 3124 |
"name": "table_name",
|
| 3125 |
"type": {
|
| 3126 |
+
"format": "dropdown",
|
| 3127 |
+
"metadata_query": "[].dataframes[].keys(@)[]"
|
| 3128 |
}
|
| 3129 |
},
|
| 3130 |
{
|
| 3131 |
"default": "",
|
| 3132 |
"name": "vector_column",
|
| 3133 |
"type": {
|
| 3134 |
+
"format": "dropdown",
|
| 3135 |
+
"metadata_query": "[].dataframes[].<table_name>.columns[]"
|
| 3136 |
}
|
| 3137 |
},
|
| 3138 |
{
|
| 3139 |
"default": "",
|
| 3140 |
"name": "label_column",
|
| 3141 |
"type": {
|
| 3142 |
+
"format": "dropdown",
|
| 3143 |
+
"metadata_query": "[].dataframes[].<table_name>.columns[]"
|
| 3144 |
}
|
| 3145 |
},
|
| 3146 |
{
|
lynxkite-app/web/package-lock.json
CHANGED
|
@@ -23,6 +23,7 @@
|
|
| 23 |
"daisyui": "^4.12.20",
|
| 24 |
"echarts": "^5.5.1",
|
| 25 |
"fuse.js": "^7.0.0",
|
|
|
|
| 26 |
"json-schema-to-typescript": "^15.0.3",
|
| 27 |
"monaco-editor": "^0.52.2",
|
| 28 |
"react": "^18.3.1",
|
|
@@ -40,6 +41,7 @@
|
|
| 40 |
"devDependencies": {
|
| 41 |
"@playwright/test": "^1.50.1",
|
| 42 |
"@tailwindcss/typography": "^0.5.16",
|
|
|
|
| 43 |
"@types/node": "^22.13.1",
|
| 44 |
"@types/react": "^18.3.14",
|
| 45 |
"@types/react-dom": "^18.3.2",
|
|
@@ -1894,6 +1896,13 @@
|
|
| 1894 |
"@types/unist": "*"
|
| 1895 |
}
|
| 1896 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1897 |
"node_modules/@types/json-schema": {
|
| 1898 |
"version": "7.0.15",
|
| 1899 |
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
|
@@ -3667,6 +3676,15 @@
|
|
| 3667 |
"jiti": "bin/jiti.js"
|
| 3668 |
}
|
| 3669 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3670 |
"node_modules/js-tokens": {
|
| 3671 |
"version": "4.0.0",
|
| 3672 |
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
|
|
|
| 23 |
"daisyui": "^4.12.20",
|
| 24 |
"echarts": "^5.5.1",
|
| 25 |
"fuse.js": "^7.0.0",
|
| 26 |
+
"jmespath": "^0.16.0",
|
| 27 |
"json-schema-to-typescript": "^15.0.3",
|
| 28 |
"monaco-editor": "^0.52.2",
|
| 29 |
"react": "^18.3.1",
|
|
|
|
| 41 |
"devDependencies": {
|
| 42 |
"@playwright/test": "^1.50.1",
|
| 43 |
"@tailwindcss/typography": "^0.5.16",
|
| 44 |
+
"@types/jmespath": "^0.15.2",
|
| 45 |
"@types/node": "^22.13.1",
|
| 46 |
"@types/react": "^18.3.14",
|
| 47 |
"@types/react-dom": "^18.3.2",
|
|
|
|
| 1896 |
"@types/unist": "*"
|
| 1897 |
}
|
| 1898 |
},
|
| 1899 |
+
"node_modules/@types/jmespath": {
|
| 1900 |
+
"version": "0.15.2",
|
| 1901 |
+
"resolved": "https://registry.npmjs.org/@types/jmespath/-/jmespath-0.15.2.tgz",
|
| 1902 |
+
"integrity": "sha512-pegh49FtNsC389Flyo9y8AfkVIZn9MMPE9yJrO9svhq6Fks2MwymULWjZqySuxmctd3ZH4/n7Mr98D+1Qo5vGA==",
|
| 1903 |
+
"dev": true,
|
| 1904 |
+
"license": "MIT"
|
| 1905 |
+
},
|
| 1906 |
"node_modules/@types/json-schema": {
|
| 1907 |
"version": "7.0.15",
|
| 1908 |
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
|
|
|
| 3676 |
"jiti": "bin/jiti.js"
|
| 3677 |
}
|
| 3678 |
},
|
| 3679 |
+
"node_modules/jmespath": {
|
| 3680 |
+
"version": "0.16.0",
|
| 3681 |
+
"resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz",
|
| 3682 |
+
"integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==",
|
| 3683 |
+
"license": "Apache-2.0",
|
| 3684 |
+
"engines": {
|
| 3685 |
+
"node": ">= 0.6.0"
|
| 3686 |
+
}
|
| 3687 |
+
},
|
| 3688 |
"node_modules/js-tokens": {
|
| 3689 |
"version": "4.0.0",
|
| 3690 |
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
lynxkite-app/web/package.json
CHANGED
|
@@ -25,6 +25,7 @@
|
|
| 25 |
"daisyui": "^4.12.20",
|
| 26 |
"echarts": "^5.5.1",
|
| 27 |
"fuse.js": "^7.0.0",
|
|
|
|
| 28 |
"json-schema-to-typescript": "^15.0.3",
|
| 29 |
"monaco-editor": "^0.52.2",
|
| 30 |
"react": "^18.3.1",
|
|
@@ -42,6 +43,7 @@
|
|
| 42 |
"devDependencies": {
|
| 43 |
"@playwright/test": "^1.50.1",
|
| 44 |
"@tailwindcss/typography": "^0.5.16",
|
|
|
|
| 45 |
"@types/node": "^22.13.1",
|
| 46 |
"@types/react": "^18.3.14",
|
| 47 |
"@types/react-dom": "^18.3.2",
|
|
|
|
| 25 |
"daisyui": "^4.12.20",
|
| 26 |
"echarts": "^5.5.1",
|
| 27 |
"fuse.js": "^7.0.0",
|
| 28 |
+
"jmespath": "^0.16.0",
|
| 29 |
"json-schema-to-typescript": "^15.0.3",
|
| 30 |
"monaco-editor": "^0.52.2",
|
| 31 |
"react": "^18.3.1",
|
|
|
|
| 43 |
"devDependencies": {
|
| 44 |
"@playwright/test": "^1.50.1",
|
| 45 |
"@tailwindcss/typography": "^0.5.16",
|
| 46 |
+
"@types/jmespath": "^0.15.2",
|
| 47 |
"@types/node": "^22.13.1",
|
| 48 |
"@types/react": "^18.3.14",
|
| 49 |
"@types/react-dom": "^18.3.2",
|
lynxkite-app/web/src/workspace/nodes/NodeParameter.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
// @ts-ignore
|
| 2 |
import ArrowsHorizontal from "~icons/tabler/arrows-horizontal.jsx";
|
| 3 |
// @ts-ignore
|
|
@@ -133,55 +134,14 @@ export default function NodeParameter({ name, value, meta, data, setParam }: Nod
|
|
| 133 |
);
|
| 134 |
}
|
| 135 |
|
| 136 |
-
// We have a little "language" for describing which part of the input_metadata
|
| 137 |
-
// to use in the dropdown.
|
| 138 |
function getDropDownValues(data: any, meta: any): string[] {
|
| 139 |
const metadata = data.input_metadata.value;
|
| 140 |
-
|
| 141 |
-
//
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
for (const path of metadata_path) {
|
| 145 |
-
o = o.flatMap((x: any) => {
|
| 146 |
-
if (x === undefined || x === null) {
|
| 147 |
-
return [];
|
| 148 |
-
}
|
| 149 |
-
// We have a path step, so x must be an object or an array.
|
| 150 |
-
// For arrays we pick an element by index or the whole array if the path is "*".
|
| 151 |
-
if (Array.isArray(x)) {
|
| 152 |
-
if (path === "*") {
|
| 153 |
-
return x;
|
| 154 |
-
}
|
| 155 |
-
return [x[Number.parseInt(path)]];
|
| 156 |
-
}
|
| 157 |
-
// For objects we pick a value by key or all values if the path is "*".
|
| 158 |
-
if (path === "*") {
|
| 159 |
-
return Object.values(x);
|
| 160 |
-
}
|
| 161 |
-
return [x[path]];
|
| 162 |
-
});
|
| 163 |
}
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
return [];
|
| 168 |
-
}
|
| 169 |
-
if (Array.isArray(x)) {
|
| 170 |
-
return x;
|
| 171 |
-
}
|
| 172 |
-
if (typeof x === "object") {
|
| 173 |
-
if (metadata_filter_key && metadata_filter_value) {
|
| 174 |
-
const keys = [];
|
| 175 |
-
for (const key in x) {
|
| 176 |
-
if (x[key][metadata_filter_key] === metadata_filter_value) {
|
| 177 |
-
keys.push(key);
|
| 178 |
-
}
|
| 179 |
-
}
|
| 180 |
-
return keys;
|
| 181 |
-
}
|
| 182 |
-
return Object.keys(x);
|
| 183 |
-
}
|
| 184 |
-
return [x];
|
| 185 |
-
});
|
| 186 |
-
return ["", ...o];
|
| 187 |
}
|
|
|
|
| 1 |
+
import jmespath from "jmespath";
|
| 2 |
// @ts-ignore
|
| 3 |
import ArrowsHorizontal from "~icons/tabler/arrows-horizontal.jsx";
|
| 4 |
// @ts-ignore
|
|
|
|
| 134 |
);
|
| 135 |
}
|
| 136 |
|
|
|
|
|
|
|
| 137 |
function getDropDownValues(data: any, meta: any): string[] {
|
| 138 |
const metadata = data.input_metadata.value;
|
| 139 |
+
let query = meta.type.metadata_query;
|
| 140 |
+
// Substitute parameters in the query.
|
| 141 |
+
for (const p in data.params) {
|
| 142 |
+
query = query.replace(`<${p}>`, data.params[p]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
}
|
| 144 |
+
const res = ["", ...jmespath.search(metadata, query)];
|
| 145 |
+
res.sort();
|
| 146 |
+
return res;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
}
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/core.py
CHANGED
|
@@ -14,25 +14,33 @@ import typing
|
|
| 14 |
|
| 15 |
ENV = "LynxKite Graph Analytics"
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
NodeAttribute = typing.Annotated[
|
| 19 |
-
str, {"format": "dropdown", "
|
| 20 |
]
|
| 21 |
EdgeAttribute = typing.Annotated[
|
| 22 |
-
str, {"format": "dropdown", "
|
|
|
|
|
|
|
|
|
|
| 23 |
]
|
| 24 |
-
OtherDropdown = typing.Annotated[str, {"format": "dropdown", "metadata_path": ["*", "other"]}]
|
| 25 |
ModelDropdown = typing.Annotated[
|
| 26 |
str,
|
| 27 |
{
|
| 28 |
"format": "dropdown",
|
| 29 |
-
"
|
| 30 |
-
"metadata_filter_key": "type",
|
| 31 |
-
"metadata_filter_value": "model",
|
| 32 |
},
|
| 33 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
ColumnDropdownByTableName = typing.Annotated[
|
| 35 |
-
str, {"format": "dropdown", "
|
| 36 |
]
|
| 37 |
|
| 38 |
|
|
@@ -162,12 +170,15 @@ class Bundle:
|
|
| 162 |
return {
|
| 163 |
"dataframes": {
|
| 164 |
name: {
|
|
|
|
| 165 |
"columns": sorted(str(c) for c in df.columns),
|
| 166 |
}
|
| 167 |
for name, df in self.dfs.items()
|
| 168 |
},
|
| 169 |
"relations": [dataclasses.asdict(relation) for relation in self.relations],
|
| 170 |
-
"other": {
|
|
|
|
|
|
|
| 171 |
}
|
| 172 |
|
| 173 |
|
|
|
|
| 14 |
|
| 15 |
ENV = "LynxKite Graph Analytics"
|
| 16 |
|
| 17 |
+
# Annotated types with format "dropdown" let you specify the available options
|
| 18 |
+
# as a query on the input_metadata. These query expressions are JMESPath expressions.
|
| 19 |
+
TableDropdown = typing.Annotated[
|
| 20 |
+
str, {"format": "dropdown", "metadata_query": "[].dataframes[].keys(@)[]"}
|
| 21 |
+
]
|
| 22 |
NodeAttribute = typing.Annotated[
|
| 23 |
+
str, {"format": "dropdown", "metadata_query": "[].dataframes[].nodes[].columns[]"}
|
| 24 |
]
|
| 25 |
EdgeAttribute = typing.Annotated[
|
| 26 |
+
str, {"format": "dropdown", "metadata_query": "[].dataframes[].edges[].columns[]"}
|
| 27 |
+
]
|
| 28 |
+
OtherDropdown = typing.Annotated[
|
| 29 |
+
str, {"format": "dropdown", "metadata_query": "[].other.keys(@)[]"}
|
| 30 |
]
|
|
|
|
| 31 |
ModelDropdown = typing.Annotated[
|
| 32 |
str,
|
| 33 |
{
|
| 34 |
"format": "dropdown",
|
| 35 |
+
"metadata_query": "[].other.*[] | [?type == 'model'].key",
|
|
|
|
|
|
|
| 36 |
},
|
| 37 |
]
|
| 38 |
+
# Parameter names in angle brackets, like <table_name>, will be replaced with the parameter
|
| 39 |
+
# values. (This is not part of JMESPath.)
|
| 40 |
+
# ColumnDropdownByTableName will list the columns of the DataFrame with the name
|
| 41 |
+
# specified by the `table_name` parameter.
|
| 42 |
ColumnDropdownByTableName = typing.Annotated[
|
| 43 |
+
str, {"format": "dropdown", "metadata_query": "[].dataframes[].<table_name>.columns[]"}
|
| 44 |
]
|
| 45 |
|
| 46 |
|
|
|
|
| 170 |
return {
|
| 171 |
"dataframes": {
|
| 172 |
name: {
|
| 173 |
+
"key": name,
|
| 174 |
"columns": sorted(str(c) for c in df.columns),
|
| 175 |
}
|
| 176 |
for name, df in self.dfs.items()
|
| 177 |
},
|
| 178 |
"relations": [dataclasses.asdict(relation) for relation in self.relations],
|
| 179 |
+
"other": {
|
| 180 |
+
k: {"key": k, **getattr(v, "metadata", lambda: {})()} for k, v in self.other.items()
|
| 181 |
+
},
|
| 182 |
}
|
| 183 |
|
| 184 |
|
lynxkite-graph-analytics/src/lynxkite_graph_analytics/ml_ops.py
CHANGED
|
@@ -209,8 +209,8 @@ def view_vectors(
|
|
| 209 |
bundle: core.Bundle,
|
| 210 |
*,
|
| 211 |
table_name: core.TableDropdown = "nodes",
|
| 212 |
-
vector_column:
|
| 213 |
-
label_column:
|
| 214 |
n_neighbors: int = 15,
|
| 215 |
min_dist: float = 0.1,
|
| 216 |
metric: UMAPMetric = UMAPMetric.euclidean,
|
|
|
|
| 209 |
bundle: core.Bundle,
|
| 210 |
*,
|
| 211 |
table_name: core.TableDropdown = "nodes",
|
| 212 |
+
vector_column: core.ColumnDropdownByTableName = "",
|
| 213 |
+
label_column: core.ColumnDropdownByTableName = "",
|
| 214 |
n_neighbors: int = 15,
|
| 215 |
min_dist: float = 0.1,
|
| 216 |
metric: UMAPMetric = UMAPMetric.euclidean,
|