mlrun 1.10.0rc10__py3-none-any.whl → 1.10.0rc11__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mlrun might be problematic. Click here for more details.
- mlrun/artifacts/manager.py +1 -1
- mlrun/common/constants.py +11 -0
- mlrun/common/schemas/model_monitoring/__init__.py +2 -0
- mlrun/common/schemas/model_monitoring/functions.py +2 -0
- mlrun/common/schemas/model_monitoring/model_endpoints.py +19 -1
- mlrun/common/schemas/serving.py +1 -0
- mlrun/common/schemas/workflow.py +3 -2
- mlrun/datastore/azure_blob.py +1 -1
- mlrun/datastore/base.py +4 -2
- mlrun/datastore/datastore.py +46 -14
- mlrun/datastore/google_cloud_storage.py +1 -1
- mlrun/datastore/s3.py +16 -5
- mlrun/datastore/sources.py +2 -2
- mlrun/datastore/targets.py +2 -2
- mlrun/db/__init__.py +0 -1
- mlrun/db/base.py +12 -0
- mlrun/db/httpdb.py +35 -0
- mlrun/db/nopdb.py +10 -0
- mlrun/execution.py +12 -0
- mlrun/frameworks/tf_keras/mlrun_interface.py +7 -18
- mlrun/launcher/base.py +1 -0
- mlrun/launcher/client.py +1 -0
- mlrun/launcher/local.py +4 -0
- mlrun/model.py +15 -4
- mlrun/model_monitoring/applications/base.py +74 -56
- mlrun/model_monitoring/db/tsdb/base.py +52 -19
- mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py +179 -11
- mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py +26 -11
- mlrun/model_monitoring/helpers.py +48 -0
- mlrun/projects/pipelines.py +12 -3
- mlrun/projects/project.py +30 -0
- mlrun/runtimes/daskjob.py +2 -0
- mlrun/runtimes/kubejob.py +4 -0
- mlrun/runtimes/mpijob/abstract.py +2 -0
- mlrun/runtimes/mpijob/v1.py +2 -0
- mlrun/runtimes/nuclio/function.py +2 -0
- mlrun/runtimes/nuclio/serving.py +59 -0
- mlrun/runtimes/pod.py +3 -0
- mlrun/runtimes/remotesparkjob.py +2 -0
- mlrun/runtimes/sparkjob/spark3job.py +2 -0
- mlrun/serving/server.py +97 -3
- mlrun/serving/states.py +146 -38
- mlrun/utils/version/version.json +2 -2
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/METADATA +13 -6
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/RECORD +49 -51
- mlrun/db/sql_types.py +0 -160
- mlrun/utils/db.py +0 -71
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/WHEEL +0 -0
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/entry_points.txt +0 -0
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/licenses/LICENSE +0 -0
- {mlrun-1.10.0rc10.dist-info → mlrun-1.10.0rc11.dist-info}/top_level.txt +0 -0
|
@@ -2,11 +2,11 @@ mlrun/__init__.py,sha256=ws9OsfTNmIGg3v8kQY57Q8rkqZqzZiL3WTvVBIFEmpQ,7475
|
|
|
2
2
|
mlrun/__main__.py,sha256=ue7zqYt-0MjiSZodMSis_tctBCvVQmVHjmUQnR9lp0E,48019
|
|
3
3
|
mlrun/config.py,sha256=zb48joymCNAcF5ZBPyX0cnK88sDk643nKL17NSBgtf0,71732
|
|
4
4
|
mlrun/errors.py,sha256=bAk0t_qmCxQSPNK0TugOAfA5R6f0G6OYvEvXUWSJ_5U,9062
|
|
5
|
-
mlrun/execution.py,sha256=
|
|
5
|
+
mlrun/execution.py,sha256=KEC2EH9C5-zL1dRPjlpf6H98y5CTcuVOiFGaU0Yjil4,55004
|
|
6
6
|
mlrun/features.py,sha256=jMEXo6NB36A6iaxNEJWzdtYwUmglYD90OIKTIEeWhE8,15841
|
|
7
7
|
mlrun/k8s_utils.py,sha256=mMnGyouHoJC93ZD2KGf9neJM1pD7mR9IXLnHOEwYVTQ,21469
|
|
8
8
|
mlrun/lists.py,sha256=OlaV2QIFUzmenad9kxNJ3k4whlDyxI3zFbGwr6vpC5Y,8561
|
|
9
|
-
mlrun/model.py,sha256=
|
|
9
|
+
mlrun/model.py,sha256=SXLhYX-x0AtK2lJXWbYwIxoo190642jILU7dXifEEAg,86398
|
|
10
10
|
mlrun/render.py,sha256=5DlhD6JtzHgmj5RVlpaYiHGhX84Q7qdi4RCEUj2UMgw,13195
|
|
11
11
|
mlrun/run.py,sha256=WUPuyWJ_2MjYRfrg3OfmEafv6g2YETKiuIdAoartSQE,45316
|
|
12
12
|
mlrun/secrets.py,sha256=dZPdkc_zzfscVQepOHUwmzFqnBavDCBXV9DQoH_eIYM,7800
|
|
@@ -19,11 +19,11 @@ mlrun/artifacts/dataset.py,sha256=7SRKvLbV7KJ2JN2s_Q45kuz74qovTvOZSz88HKM4JfA,16
|
|
|
19
19
|
mlrun/artifacts/document.py,sha256=p5HsWdmIIJ0NahS7y3EEQN2tfHtUrUmUG-8BEEyi_Jc,17373
|
|
20
20
|
mlrun/artifacts/helpers.py,sha256=ejTEC9vkI2w5FHn5Gopw3VEIxuni0bazWUnR6BBWZfU,1662
|
|
21
21
|
mlrun/artifacts/llm_prompt.py,sha256=19ubV9owECwqb73wDnS8lED_siWYoJCRsrK_Td0DXdo,5428
|
|
22
|
-
mlrun/artifacts/manager.py,sha256=
|
|
22
|
+
mlrun/artifacts/manager.py,sha256=DEIQBfQhaondfChjmEN-zt-dBvV90yHLzIVqd4oGh00,16827
|
|
23
23
|
mlrun/artifacts/model.py,sha256=YlhD0zX8UhuEjTWD7NNnWcRCpjF1S2_6IpE0a1VHEHM,25589
|
|
24
24
|
mlrun/artifacts/plots.py,sha256=wmaxVXiAPSCyn3M7pIlcBu9pP3O8lrq0Ewx6iHRDF9s,4238
|
|
25
25
|
mlrun/common/__init__.py,sha256=kXGBqhLN0rlAx0kTXhozGzFsIdSqW0uTSKMmsLgq_is,569
|
|
26
|
-
mlrun/common/constants.py,sha256=
|
|
26
|
+
mlrun/common/constants.py,sha256=wpwwJLuFloYZVfpMVAUFIphNU87EB3IwHeKTJDBOoQ0,4010
|
|
27
27
|
mlrun/common/helpers.py,sha256=DIdqs_eN3gO5bZ8iFobIvx8cEiOxYxhFIyut6-O69T0,1385
|
|
28
28
|
mlrun/common/secrets.py,sha256=8g9xtIw-9DGcwiZRT62a5ozSQM-aYo8yK5Ghey9WM0g,5179
|
|
29
29
|
mlrun/common/types.py,sha256=1gxThbmC0Vd0U1ffIkEwz4T4S7JOgHt70rvw8TCO21c,1073
|
|
@@ -71,14 +71,14 @@ mlrun/common/schemas/runs.py,sha256=yKY29ByTS4SruWQyPpDNFGulMrcT9Ms-3lnwBUDp3us,
|
|
|
71
71
|
mlrun/common/schemas/runtime_resource.py,sha256=TybJmCHJXmm1z3s5J1dd89TeFE6lG5t7vjcrf1R9YfE,1568
|
|
72
72
|
mlrun/common/schemas/schedule.py,sha256=L7z9Lp06-xmFmdp0q5PypCU_DCl6zZIyQTVoJa01gfM,4291
|
|
73
73
|
mlrun/common/schemas/secret.py,sha256=Td2UAeWHSAdA4nIP3rQv_PIVKVqcBnCnK6xjr528tS8,1486
|
|
74
|
-
mlrun/common/schemas/serving.py,sha256=
|
|
74
|
+
mlrun/common/schemas/serving.py,sha256=3Z-SxtC4HQ29V-i5rWwlWDE_2EUHNyVrgyQhYv1wCwg,1270
|
|
75
75
|
mlrun/common/schemas/tag.py,sha256=1wqEiAujsElojWb3qmuyfcaLFjXSNAAQdafkDx7fkn0,891
|
|
76
|
-
mlrun/common/schemas/workflow.py,sha256=
|
|
77
|
-
mlrun/common/schemas/model_monitoring/__init__.py,sha256=
|
|
76
|
+
mlrun/common/schemas/workflow.py,sha256=emoUaBD_53pzrjglzTjSknCqvyx3_huj04wBp24G9fs,2432
|
|
77
|
+
mlrun/common/schemas/model_monitoring/__init__.py,sha256=K9XumcIsTxdp8oNvCSluBGCS07rbJibHcA1DSg8Xe4w,1877
|
|
78
78
|
mlrun/common/schemas/model_monitoring/constants.py,sha256=yjTaSGiRs0zYIE20QSuJuMNnS5iuJpnV1wBiq7leVpg,13238
|
|
79
|
-
mlrun/common/schemas/model_monitoring/functions.py,sha256=
|
|
79
|
+
mlrun/common/schemas/model_monitoring/functions.py,sha256=VvbsW8UxD-Raj3gaLpHzEierXl_yA9PO11r1ps4fJZ4,2204
|
|
80
80
|
mlrun/common/schemas/model_monitoring/grafana.py,sha256=THQlLfPBevBksta8p5OaIsBaJtsNSXexLvHrDxOaVns,2095
|
|
81
|
-
mlrun/common/schemas/model_monitoring/model_endpoints.py,sha256=
|
|
81
|
+
mlrun/common/schemas/model_monitoring/model_endpoints.py,sha256=4r__SdR447aUB8hLzFEXUA8Y4IANw4WKINgkbJ84PA0,13056
|
|
82
82
|
mlrun/data_types/__init__.py,sha256=wdxGS1PTnaKXiNZ7PYGxxo86OifHH7NYoArIjDJksLA,1054
|
|
83
83
|
mlrun/data_types/data_types.py,sha256=0_oKLC6-sXL2_nnaDMP_HSXB3fD1nJAG4J2Jq6sGNNw,4998
|
|
84
84
|
mlrun/data_types/infer.py,sha256=F_dW7oR6jrhdONzTl4ngeGh9x7twHdpUJBd2xMVA1Vw,6476
|
|
@@ -86,36 +86,35 @@ mlrun/data_types/spark.py,sha256=I5JC887dT9RGs5Tqz5zaRxlCMyhMeFmwuNbExQoyW0E,962
|
|
|
86
86
|
mlrun/data_types/to_pandas.py,sha256=KOy0FLXPJirsgH6szcC5BI6t70yVDCjuo6LmuYHNTuI,11429
|
|
87
87
|
mlrun/datastore/__init__.py,sha256=81ulmQnRk1ENvwYOdetxqsLnr2gYVtW-KsvF-tY1Jxk,5783
|
|
88
88
|
mlrun/datastore/alibaba_oss.py,sha256=k-OHVe08HjMewlkpsT657CbOiVFAfSq9_EqhCE-k86s,4940
|
|
89
|
-
mlrun/datastore/azure_blob.py,sha256=
|
|
90
|
-
mlrun/datastore/base.py,sha256=
|
|
91
|
-
mlrun/datastore/datastore.py,sha256
|
|
89
|
+
mlrun/datastore/azure_blob.py,sha256=YWDoe-JiQVpteRRnd3aviRyg5EYZ7c2RbCJ3tQD-fOI,12787
|
|
90
|
+
mlrun/datastore/base.py,sha256=IwWVXzV2k3EODDGOkeY_17bZezujwdg4cOmGhqUKpRs,26238
|
|
91
|
+
mlrun/datastore/datastore.py,sha256=-f-cipw7JNEc-FacSsBRgk0IR8JTPzMDTB4saoWQwuw,10617
|
|
92
92
|
mlrun/datastore/datastore_profile.py,sha256=BtcIKt9OK_rji4NKw2SnjTt0ECU3leRzGy_ndmd4gxA,21812
|
|
93
93
|
mlrun/datastore/dbfs_store.py,sha256=QkDRzwFnvm7CgEg4NuGxes6tBgKDyhX0CiBUvK8c9pk,6568
|
|
94
94
|
mlrun/datastore/filestore.py,sha256=OcykjzhbUAZ6_Cb9bGAXRL2ngsOpxXSb4rR0lyogZtM,3773
|
|
95
|
-
mlrun/datastore/google_cloud_storage.py,sha256=
|
|
95
|
+
mlrun/datastore/google_cloud_storage.py,sha256=dkOwnUV0Y0qPAqXqsolo1bXDgK-uGe71PSDKcnjyGxU,8727
|
|
96
96
|
mlrun/datastore/hdfs.py,sha256=NhxvPojQQDEm0xzB6RcvnD4uLZOxfHHKYWV4gwzG7D4,1928
|
|
97
97
|
mlrun/datastore/inmem.py,sha256=IsM83nn-3CqmGdLzim7i9ZmJwG6ZGhBZGN6_hszWZnE,2951
|
|
98
98
|
mlrun/datastore/redis.py,sha256=yzkVU8c9glXsjVW48RXKzEXaHPrCfQFHabFa4SJ0pN0,5567
|
|
99
|
-
mlrun/datastore/s3.py,sha256=
|
|
99
|
+
mlrun/datastore/s3.py,sha256=1h-fpJMk1iNDudV_5--HoYinaJa6QTJ9HvQflp3HSuY,9717
|
|
100
100
|
mlrun/datastore/snowflake_utils.py,sha256=KBbIN8REEuQyk1tVIW33rpwORzbC0Wmj0pm43h-dInA,1481
|
|
101
|
-
mlrun/datastore/sources.py,sha256=
|
|
101
|
+
mlrun/datastore/sources.py,sha256=98jazPqOvEz49aeVuKilXbBCeaZnQvaKbZXmkrPgePA,49066
|
|
102
102
|
mlrun/datastore/spark_udf.py,sha256=NnnB3DZxZb-rqpRy7b-NC7QWXuuqFn3XkBDc86tU4mQ,1498
|
|
103
103
|
mlrun/datastore/spark_utils.py,sha256=dn0RWpYzee-M8UZw-NVuHAdqlNAZ7VO-fNtI8ZiDkyM,2864
|
|
104
104
|
mlrun/datastore/store_resources.py,sha256=s2794zqkzy_mjRMvRedDNs_tycTLoF8wxTqsWRQphCE,6839
|
|
105
105
|
mlrun/datastore/storeytargets.py,sha256=OwWw-YrrtrnKpbUSP8tgWyKusArsLygkD365X7TT4yE,6500
|
|
106
|
-
mlrun/datastore/targets.py,sha256=
|
|
106
|
+
mlrun/datastore/targets.py,sha256=8dRnLy1wBYJbVyommYkpGeztdT1CsfFHZY6Zh7o8X-Q,79165
|
|
107
107
|
mlrun/datastore/utils.py,sha256=uQ2v_bZshITpy3Sm3_wcP4_cthWDeGAEaTJuvQ60NG0,10830
|
|
108
108
|
mlrun/datastore/v3io.py,sha256=QSYBORRLcJTeM9mt0EaWzyLcdmzrPkqrF7k5uLTam5U,8209
|
|
109
109
|
mlrun/datastore/vectorstore.py,sha256=k-yom5gfw20hnVG0Rg7aBEehuXwvAloZwn0cx0VGals,11708
|
|
110
110
|
mlrun/datastore/wasbfs/__init__.py,sha256=s5Ul-0kAhYqFjKDR2X0O2vDGDbLQQduElb32Ev56Te4,1343
|
|
111
111
|
mlrun/datastore/wasbfs/fs.py,sha256=ge8NK__5vTcFT-krI155_8RDUywQw4SIRX6BWATXy9Q,6299
|
|
112
|
-
mlrun/db/__init__.py,sha256=
|
|
112
|
+
mlrun/db/__init__.py,sha256=WqJ4x8lqJ7ZoKbhEyFqkYADd9P6E3citckx9e9ZLcIU,1163
|
|
113
113
|
mlrun/db/auth_utils.py,sha256=hpg8D2r82oN0BWabuWN04BTNZ7jYMAF242YSUpK7LFM,5211
|
|
114
|
-
mlrun/db/base.py,sha256=
|
|
114
|
+
mlrun/db/base.py,sha256=CHhYPwgr4n3QX4_8HX_PH5EJb4Xy97YE5sCf7XZ2eDo,31456
|
|
115
115
|
mlrun/db/factory.py,sha256=yP2vVmveUE7LYTCHbS6lQIxP9rW--zdISWuPd_I3d_4,2111
|
|
116
|
-
mlrun/db/httpdb.py,sha256=
|
|
117
|
-
mlrun/db/nopdb.py,sha256=
|
|
118
|
-
mlrun/db/sql_types.py,sha256=g-gmiRNr0SpFyV0wPFfvLpB7hB0jdW-WFkt-aoQ_qIU,5399
|
|
116
|
+
mlrun/db/httpdb.py,sha256=yPLTvg9zgDeH0yTQ07XAdZ_5_gphwaXjUcV6Zu6Srx0,236247
|
|
117
|
+
mlrun/db/nopdb.py,sha256=3bZgFctliLWFI9ScYrKZberVM7VpIHvpk3YtscO53c8,27807
|
|
119
118
|
mlrun/feature_store/__init__.py,sha256=SlI845bWt6xX34SXunHHqhmFAR9-5v2ak8N-qpcAPGo,1328
|
|
120
119
|
mlrun/feature_store/api.py,sha256=qKj5Tk6prTab6XWatWhBuPRVp0eJEctoxRMN2wz48vA,32168
|
|
121
120
|
mlrun/feature_store/common.py,sha256=JlQA7XWkg9fLuw7cXFmWpUneQqM3NBhwv7DU_xlenWI,12819
|
|
@@ -203,7 +202,7 @@ mlrun/frameworks/sklearn/mlrun_interface.py,sha256=Lk1MKzP7d72R6_1PTWO5pKY1VUEHc
|
|
|
203
202
|
mlrun/frameworks/sklearn/model_handler.py,sha256=m7ohGO8sphuVU0vZAzVNBATY0WNUpQb_SmaO6xkZx8U,4752
|
|
204
203
|
mlrun/frameworks/sklearn/utils.py,sha256=OPyuXOwod6Tjs5PcIStwtwZfIaQk-hL9wzNbjQ29LuU,1208
|
|
205
204
|
mlrun/frameworks/tf_keras/__init__.py,sha256=M2sMbYHLrlF-KFR5kvA9mevRo3Nf8U0B5a_DM9rzwCY,10484
|
|
206
|
-
mlrun/frameworks/tf_keras/mlrun_interface.py,sha256=
|
|
205
|
+
mlrun/frameworks/tf_keras/mlrun_interface.py,sha256=3Oj2LFHLmj8HxORyKmy2EwKke53ifkLQ3POSTa_W-5I,16109
|
|
207
206
|
mlrun/frameworks/tf_keras/model_handler.py,sha256=jBTBAS8CtftwFkXwt7mLbJNw_Lbfw3FMgGxoStYoXcA,32169
|
|
208
207
|
mlrun/frameworks/tf_keras/model_server.py,sha256=60iJRl_9ZYPCzxdfiJM_-BtECKZZTOKWBJ36O-GLjEc,9652
|
|
209
208
|
mlrun/frameworks/tf_keras/utils.py,sha256=Z8hA1CgpSJWLC_T6Ay7xZKVyWlX9B85MSmQr2biXRag,4582
|
|
@@ -216,21 +215,21 @@ mlrun/frameworks/xgboost/mlrun_interface.py,sha256=KINOf0udbY75raTewjEFGNlIRyE0e
|
|
|
216
215
|
mlrun/frameworks/xgboost/model_handler.py,sha256=bJq4D1VK3rzhALovqIV5mS0LvGiTlsgAkHanD25pU2c,11663
|
|
217
216
|
mlrun/frameworks/xgboost/utils.py,sha256=4rShiFChzDbWJ4HoTo4qV_lj-Z89pHBAp6Z1yHmU8wA,1068
|
|
218
217
|
mlrun/launcher/__init__.py,sha256=JL8qkT1lLr1YvW6iP0hmwDTaSR2RfrMDx0-1gWRhTOE,571
|
|
219
|
-
mlrun/launcher/base.py,sha256=
|
|
220
|
-
mlrun/launcher/client.py,sha256=
|
|
218
|
+
mlrun/launcher/base.py,sha256=gaqBvrL-Yg4uXSM7bqbS_LR6H_Fm5jeRdF-81Sx1wUw,16707
|
|
219
|
+
mlrun/launcher/client.py,sha256=cl40ZdF2fU1QbUKdl4Xnucb1u2h-8_dn095qIUyxbuM,6402
|
|
221
220
|
mlrun/launcher/factory.py,sha256=RW7mfzEFi8fR0M-4W1JQg1iq3_muUU6OTqT_3l4Ubrk,2338
|
|
222
|
-
mlrun/launcher/local.py,sha256=
|
|
221
|
+
mlrun/launcher/local.py,sha256=BCA8WQc8yDjJTzktyBRxB0iiWEXOW7832tV9KsAZkn8,11639
|
|
223
222
|
mlrun/launcher/remote.py,sha256=GYXsxVIwcUZ1V-cv2R3Yk4nSoUeAtRurEawrUN3AkEE,7715
|
|
224
223
|
mlrun/model_monitoring/__init__.py,sha256=2zigVN5JUnOhRcqGBd4gj0ctubVlyEvxmxXix0De5GQ,709
|
|
225
224
|
mlrun/model_monitoring/api.py,sha256=lAsUp-gzqw8D1cpHVGA2_nPMYn5R4jdxk9UaGOiQ8fE,25945
|
|
226
225
|
mlrun/model_monitoring/controller.py,sha256=CQxK9Sq5k8XonvVBQnSimakpTwMMAyqT5mOaG534MaM,37660
|
|
227
226
|
mlrun/model_monitoring/features_drift_table.py,sha256=c6GpKtpOJbuT1u5uMWDL_S-6N4YPOmlktWMqPme3KFY,25308
|
|
228
|
-
mlrun/model_monitoring/helpers.py,sha256=
|
|
227
|
+
mlrun/model_monitoring/helpers.py,sha256=ZvPcJ5TxxDP2AXwK7JUDyz4yWIYA7oW14vF_x3l7Imo,22843
|
|
229
228
|
mlrun/model_monitoring/stream_processing.py,sha256=Gu3TQzYoNjbreZYI73-F49QpYrod9RZOyGSgininBsA,33373
|
|
230
229
|
mlrun/model_monitoring/writer.py,sha256=rGRFzSOkqZWvD3Y6sVk2H1Gepfnkzkp9ce00PsApTLo,8288
|
|
231
230
|
mlrun/model_monitoring/applications/__init__.py,sha256=MaH_n4GiqqQvSkntM5yQ7_FCANtM_IfgK-IJTdo4G_E,757
|
|
232
231
|
mlrun/model_monitoring/applications/_application_steps.py,sha256=t9LDIqQUGE10cyjyhlg0QqN1yVx0apD1HpERYLJfm8U,7409
|
|
233
|
-
mlrun/model_monitoring/applications/base.py,sha256=
|
|
232
|
+
mlrun/model_monitoring/applications/base.py,sha256=bbIh1TSfrWInb4-mNiuyq5qCA3jOGzQkKcQUA4l5lts,33164
|
|
234
233
|
mlrun/model_monitoring/applications/context.py,sha256=fAGFNCyNhSnVJPSIeJxv-XmEL2JhDmjK5Ouog9qyvdc,17035
|
|
235
234
|
mlrun/model_monitoring/applications/histogram_data_drift.py,sha256=2qgfFmrpHf-x0_EaHD-0T28piwSQzw-HH71aV1GwbZs,15389
|
|
236
235
|
mlrun/model_monitoring/applications/results.py,sha256=_qmj6TWT0SR2bi7gUyRKBU418eGgGoLW2_hTJ7S-ock,5782
|
|
@@ -240,16 +239,16 @@ mlrun/model_monitoring/db/__init__.py,sha256=r47xPGZpIfMuv8J3PQCZTSqVPMhUta4sSJC
|
|
|
240
239
|
mlrun/model_monitoring/db/_schedules.py,sha256=RWn4wtKsIXg668gMLpxO9I8GlkxvPSaA5y7w-wFDcgE,9048
|
|
241
240
|
mlrun/model_monitoring/db/_stats.py,sha256=VVMWLMqG3Us3ozBkLaokJF22Ewv8WKmVE1-OvS_g9vA,6943
|
|
242
241
|
mlrun/model_monitoring/db/tsdb/__init__.py,sha256=4S86V_Ot_skE16SLkw0WwsaAUB0ECH6SoJdp-TIu6s8,4645
|
|
243
|
-
mlrun/model_monitoring/db/tsdb/base.py,sha256=
|
|
242
|
+
mlrun/model_monitoring/db/tsdb/base.py,sha256=JABCZil4LyU-qOzFNYozqt6WlBWFLPNasziDJoE3UGo,30472
|
|
244
243
|
mlrun/model_monitoring/db/tsdb/helpers.py,sha256=0oUXc4aUkYtP2SGP6jTb3uPPKImIUsVsrb9otX9a7O4,1189
|
|
245
244
|
mlrun/model_monitoring/db/tsdb/tdengine/__init__.py,sha256=vgBdsKaXUURKqIf3M0y4sRatmSVA4CQiJs7J5dcVBkQ,620
|
|
246
245
|
mlrun/model_monitoring/db/tsdb/tdengine/schemas.py,sha256=EslhaR65jfeNdD5Ibk-3Hb4e5r5qYPfHb9rTChX3sG0,12689
|
|
247
246
|
mlrun/model_monitoring/db/tsdb/tdengine/stream_graph_steps.py,sha256=Uadj0UvAmln2MxDWod-kAzau1uNlqZh981rPhbUH_5M,2857
|
|
248
247
|
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connection.py,sha256=dtkaHaWKWERPXylEWMECeetwrz3rWl0P43AADcTjlls,9330
|
|
249
|
-
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=
|
|
248
|
+
mlrun/model_monitoring/db/tsdb/tdengine/tdengine_connector.py,sha256=aI8WXi3P64P7cIe6L-vQ3oyt-9anhALWMXKEvUSZI3s,48199
|
|
250
249
|
mlrun/model_monitoring/db/tsdb/v3io/__init__.py,sha256=aL3bfmQsUQ-sbvKGdNihFj8gLCK3mSys0qDcXtYOwgc,616
|
|
251
250
|
mlrun/model_monitoring/db/tsdb/v3io/stream_graph_steps.py,sha256=_-zo9relCDtjGgievxAcAP9gVN9nDWs8BzGtFwTjb9M,6284
|
|
252
|
-
mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py,sha256=
|
|
251
|
+
mlrun/model_monitoring/db/tsdb/v3io/v3io_connector.py,sha256=v-ccoHKVN2Best6DAz8BeX6DtyDB8S6vDztMKxWFpq0,50911
|
|
253
252
|
mlrun/model_monitoring/metrics/__init__.py,sha256=6CsTXAxeLbbf8yfCADTaxmiavqwrLEdYFJ-qc5kgDAY,569
|
|
254
253
|
mlrun/model_monitoring/metrics/histogram_distance.py,sha256=E9_WIl2vd6qNvoHVHoFcnuQk3ekbFWOdi8aU7sHrfk4,4724
|
|
255
254
|
mlrun/package/__init__.py,sha256=v7VDyK9kDOOuDvFo4oiGV2fx-vM1KL7fdN9pGLakhUQ,7008
|
|
@@ -273,44 +272,44 @@ mlrun/platforms/__init__.py,sha256=ZuyeHCHHUxYEoZRmaJqzFSfwhaTyUdBZXMeVp75ql1w,3
|
|
|
273
272
|
mlrun/platforms/iguazio.py,sha256=6VBTq8eQ3mzT96tzjYhAtcMQ2VjF4x8LpIPW5DAcX2Q,13749
|
|
274
273
|
mlrun/projects/__init__.py,sha256=hdCOA6_fp8X4qGGGT7Bj7sPbkM1PayWuaVZL0DkpuZw,1240
|
|
275
274
|
mlrun/projects/operations.py,sha256=Aa3qDjEOLI1JTvm3t3VaESeJ4511e_vOR-GqVaEy-yI,20237
|
|
276
|
-
mlrun/projects/pipelines.py,sha256=
|
|
277
|
-
mlrun/projects/project.py,sha256=
|
|
275
|
+
mlrun/projects/pipelines.py,sha256=4fwjxKSkZ-B0ZZYUwAvXC6119fAbxp0amCqLcDH8fes,50810
|
|
276
|
+
mlrun/projects/project.py,sha256=_ZafzjPzrZp-DWA60mGNagyKB2UEX91QUGYziR_HsKs,250882
|
|
278
277
|
mlrun/runtimes/__init__.py,sha256=J9Sy2HiyMlztNv6VUurMzF5H2XzttNil8nRsWDsqLyg,8923
|
|
279
278
|
mlrun/runtimes/base.py,sha256=FmjyXA5MhOUOe8TxNpC3p8nc_IwGGaC2ZPrgTylzFXk,37325
|
|
280
|
-
mlrun/runtimes/daskjob.py,sha256=
|
|
279
|
+
mlrun/runtimes/daskjob.py,sha256=1VYia3vEgArKNyZe-yJjQevhifWO6F5gP1Q44y-tKqk,19842
|
|
281
280
|
mlrun/runtimes/funcdoc.py,sha256=zRFHrJsV8rhDLJwoUhcfZ7Cs0j-tQ76DxwUqdXV_Wyc,9810
|
|
282
281
|
mlrun/runtimes/function_reference.py,sha256=fnMKUEieKgy4JyVLhFpDtr6JvKgOaQP8F_K2H3-Pk9U,5030
|
|
283
282
|
mlrun/runtimes/generators.py,sha256=X8NDlCEPveDDPOHtOGcSpbl3pAVM3DP7fuPj5xVhxEY,7290
|
|
284
|
-
mlrun/runtimes/kubejob.py,sha256=
|
|
283
|
+
mlrun/runtimes/kubejob.py,sha256=wadCzmSgjv9OU_Ax8CQNHfXLo0v-ev9ZGHUFGcNc9Qw,8577
|
|
285
284
|
mlrun/runtimes/local.py,sha256=yedo3R1c46cB1mX7aOz8zORXswQPvX86U-_fYxXoqTY,22717
|
|
286
285
|
mlrun/runtimes/mounts.py,sha256=2dkoktm3TXHe4XHmRhvC0UfvWzq2vy_13MeaW7wgyPo,18735
|
|
287
|
-
mlrun/runtimes/pod.py,sha256=
|
|
288
|
-
mlrun/runtimes/remotesparkjob.py,sha256=
|
|
286
|
+
mlrun/runtimes/pod.py,sha256=YwkvZQqj2M2YP1xg6ECbzh-DfcBo9rJCIJxfrsJ8thA,51711
|
|
287
|
+
mlrun/runtimes/remotesparkjob.py,sha256=IMnolOY6jh1xMrCtxs-awUqQoWVgRpan4l0b91vUqdI,7693
|
|
289
288
|
mlrun/runtimes/utils.py,sha256=VFKA7dWuILAcJGia_7Pw_zBBG00wZlat7o2N6u5EItw,16284
|
|
290
289
|
mlrun/runtimes/databricks_job/__init__.py,sha256=kXGBqhLN0rlAx0kTXhozGzFsIdSqW0uTSKMmsLgq_is,569
|
|
291
290
|
mlrun/runtimes/databricks_job/databricks_cancel_task.py,sha256=ufjcLKA5E6FSDF5CXm5l8uP_mUSFppwr5krLHln1kAU,2243
|
|
292
291
|
mlrun/runtimes/databricks_job/databricks_runtime.py,sha256=YOJdyIEeKbn9jKxSciciZE9RBsH7Hbk7n-3T_8NLz_w,12810
|
|
293
292
|
mlrun/runtimes/databricks_job/databricks_wrapper.py,sha256=jD1T36pRmSFRGgJVGRzccYJxwYH8eVze_FJrF2aSS-g,8682
|
|
294
293
|
mlrun/runtimes/mpijob/__init__.py,sha256=6sUPQRFwigi4mqjDVZmRE-qgaLw2ILY5NbneVUuMKto,947
|
|
295
|
-
mlrun/runtimes/mpijob/abstract.py,sha256=
|
|
296
|
-
mlrun/runtimes/mpijob/v1.py,sha256=
|
|
294
|
+
mlrun/runtimes/mpijob/abstract.py,sha256=AJYRF4Jv0NWTUY3buri3XbbrXqC1ZMPHKLKUMcqWRW8,9237
|
|
295
|
+
mlrun/runtimes/mpijob/v1.py,sha256=k04Tu1Y58tt9qckyR6Kd8l6O3fLMGvGyAzxYunfpqEE,3201
|
|
297
296
|
mlrun/runtimes/nuclio/__init__.py,sha256=gx1kizzKv8pGT5TNloN1js1hdbxqDw3rM90sLVYVffY,794
|
|
298
297
|
mlrun/runtimes/nuclio/api_gateway.py,sha256=vH9ClKVP4Mb24rvA67xPuAvAhX-gAv6vVtjVxyplhdc,26969
|
|
299
|
-
mlrun/runtimes/nuclio/function.py,sha256=
|
|
298
|
+
mlrun/runtimes/nuclio/function.py,sha256=odONJcrnhZT8veIyvd3ygEfUxP0cDEceTfP91mg1XAA,54352
|
|
300
299
|
mlrun/runtimes/nuclio/nuclio.py,sha256=sLK8KdGO1LbftlL3HqPZlFOFTAAuxJACZCVl1c0Ha6E,2942
|
|
301
|
-
mlrun/runtimes/nuclio/serving.py,sha256=
|
|
300
|
+
mlrun/runtimes/nuclio/serving.py,sha256=7nN9p7oxpjWxYKTpLQGst58TxvKepHO-6B4zTFJ9PlU,35309
|
|
302
301
|
mlrun/runtimes/nuclio/application/__init__.py,sha256=rRs5vasy_G9IyoTpYIjYDafGoL6ifFBKgBtsXn31Atw,614
|
|
303
302
|
mlrun/runtimes/nuclio/application/application.py,sha256=3WeVCeVUb6U5wJDVJSuTDzJ-Pcr3ifg08E4gKIEIkmo,28945
|
|
304
303
|
mlrun/runtimes/nuclio/application/reverse_proxy.go,sha256=lEHH74vr2PridIHp1Jkc_NjkrWb5b6zawRrNxHQhwGU,2913
|
|
305
304
|
mlrun/runtimes/sparkjob/__init__.py,sha256=GPP_ekItxiU9Ydn3mJa4Obph02Bg6DO-JYs791_MV58,607
|
|
306
|
-
mlrun/runtimes/sparkjob/spark3job.py,sha256=
|
|
305
|
+
mlrun/runtimes/sparkjob/spark3job.py,sha256=5TdmQy5yDBtaq9y9fQGrNYTJ_0UqR9VnV7-SGiZEOyc,41287
|
|
307
306
|
mlrun/serving/__init__.py,sha256=1MjUInuyxsF-dTHZuKelq2XLhg2GInH9LjAY3PcWEzs,1364
|
|
308
307
|
mlrun/serving/merger.py,sha256=pfOQoozUyObCTpqXAMk94PmhZefn4bBrKufO3MKnkAc,6193
|
|
309
308
|
mlrun/serving/remote.py,sha256=Igha2FipK3-6rV_PZ1K464kTbiTu8rhc6SMm-HiEJ6o,18817
|
|
310
309
|
mlrun/serving/routers.py,sha256=SmBOlHn7rT2gWTa-W8f16UB0UthgIFc4D1cPOZAA9ss,54003
|
|
311
|
-
mlrun/serving/server.py,sha256=
|
|
310
|
+
mlrun/serving/server.py,sha256=SkpT2qBZ0GdBh4j5KrGwzsnAiDL2wGxwoHls9Z0Nc8M,32504
|
|
312
311
|
mlrun/serving/serving_wrapper.py,sha256=UL9hhWCfMPcTJO_XrkvNaFvck1U1E7oS8trTZyak0cA,835
|
|
313
|
-
mlrun/serving/states.py,sha256=
|
|
312
|
+
mlrun/serving/states.py,sha256=bNu6xa7NdNYdIYZE5vH-OFs5EhzqJ185GC42xqCRTzo,96278
|
|
314
313
|
mlrun/serving/system_steps.py,sha256=s3Grs8DPaQ2CI8EY1IB4IOg-8y-6gRIewQZHkFVFNwg,16429
|
|
315
314
|
mlrun/serving/utils.py,sha256=Zbfqm8TKNcTE8zRBezVBzpvR2WKeKeIRN7otNIaiYEc,4170
|
|
316
315
|
mlrun/serving/v1_serving.py,sha256=c6J_MtpE-Tqu00-6r4eJOCO6rUasHDal9W2eBIcrl50,11853
|
|
@@ -325,7 +324,6 @@ mlrun/utils/async_http.py,sha256=8Olx8TNNeXB07nEGwlqhEgFgnFAD71vBU_bqaA9JW-w,122
|
|
|
325
324
|
mlrun/utils/azure_vault.py,sha256=IEFizrDGDbAaoWwDr1WoA88S_EZ0T--vjYtY-i0cvYQ,3450
|
|
326
325
|
mlrun/utils/clones.py,sha256=qbAGyEbSvlewn3Tw_DpQZP9z6MGzFhSaZfI1CblX8Fg,7515
|
|
327
326
|
mlrun/utils/condition_evaluator.py,sha256=-nGfRmZzivn01rHTroiGY4rqEv8T1irMyhzxEei-sKc,1897
|
|
328
|
-
mlrun/utils/db.py,sha256=UIYDPHvPxim8tpjeD4S2QbfTx9Bhe-VqUQjqYTRHFuo,2185
|
|
329
327
|
mlrun/utils/helpers.py,sha256=DS_SEUupY6KkLO-ejHiVLPdAEKBvanoxifIng2d9qwg,80448
|
|
330
328
|
mlrun/utils/http.py,sha256=5ZU2VpokaUM_DT3HBSqTm8xjUqTPjZN5fKkSIvKlTl0,8704
|
|
331
329
|
mlrun/utils/logger.py,sha256=RG0m1rx6gfkJ-2C1r_p41MMpPiaDYqaYM2lYHDlNZEU,14767
|
|
@@ -345,11 +343,11 @@ mlrun/utils/notifications/notification/mail.py,sha256=ZyJ3eqd8simxffQmXzqd3bgbAq
|
|
|
345
343
|
mlrun/utils/notifications/notification/slack.py,sha256=kfhogR5keR7Zjh0VCjJNK3NR5_yXT7Cv-x9GdOUW4Z8,7294
|
|
346
344
|
mlrun/utils/notifications/notification/webhook.py,sha256=zxh8CAlbPnTazsk6r05X5TKwqUZVOH5KBU2fJbzQlG4,5330
|
|
347
345
|
mlrun/utils/version/__init__.py,sha256=YnzE6tlf24uOQ8y7Z7l96QLAI6-QEii7-77g8ynmzy0,613
|
|
348
|
-
mlrun/utils/version/version.json,sha256=
|
|
346
|
+
mlrun/utils/version/version.json,sha256=myZoDYTXkNBvFvsYjV0fwOLDN9Bz7m02wel5aHgkQlY,90
|
|
349
347
|
mlrun/utils/version/version.py,sha256=M2hVhRrgkN3SxacZHs3ZqaOsqAA7B6a22ne324IQ1HE,1877
|
|
350
|
-
mlrun-1.10.
|
|
351
|
-
mlrun-1.10.
|
|
352
|
-
mlrun-1.10.
|
|
353
|
-
mlrun-1.10.
|
|
354
|
-
mlrun-1.10.
|
|
355
|
-
mlrun-1.10.
|
|
348
|
+
mlrun-1.10.0rc11.dist-info/licenses/LICENSE,sha256=zTiv1CxWNkOk1q8eJS1G_8oD4gWpWLwWxj_Agcsi8Os,11337
|
|
349
|
+
mlrun-1.10.0rc11.dist-info/METADATA,sha256=P8JaF4F4PsLA7_a_77AbbuOo59pL26QQ5Q9cEtUolro,26411
|
|
350
|
+
mlrun-1.10.0rc11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
351
|
+
mlrun-1.10.0rc11.dist-info/entry_points.txt,sha256=1Owd16eAclD5pfRCoJpYC2ZJSyGNTtUr0nCELMioMmU,46
|
|
352
|
+
mlrun-1.10.0rc11.dist-info/top_level.txt,sha256=NObLzw3maSF9wVrgSeYBv-fgnHkAJ1kEkh12DLdd5KM,6
|
|
353
|
+
mlrun-1.10.0rc11.dist-info/RECORD,,
|
mlrun/db/sql_types.py
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 Iguazio
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
"""
|
|
15
|
-
This module provides SQLAlchemy TypeDecorator subclasses that are aware of
|
|
16
|
-
database dialects (MySQL, PostgreSQL, SQLite) and automatically select
|
|
17
|
-
appropriate native types (e.g., UUID, BLOB, TIMESTAMP with precision) or
|
|
18
|
-
fallbacks (e.g., hex-string storage) to ensure consistent behavior across
|
|
19
|
-
different database backends.
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
import uuid
|
|
23
|
-
from typing import Any, Optional, Union
|
|
24
|
-
|
|
25
|
-
import sqlalchemy.types
|
|
26
|
-
from sqlalchemy import CHAR, Text
|
|
27
|
-
from sqlalchemy.dialects.mysql import DATETIME as MYSQL_DATETIME
|
|
28
|
-
from sqlalchemy.dialects.mysql import MEDIUMBLOB
|
|
29
|
-
from sqlalchemy.dialects.postgresql import BYTEA
|
|
30
|
-
from sqlalchemy.dialects.postgresql import TIMESTAMP as PG_TIMESTAMP
|
|
31
|
-
from sqlalchemy.dialects.postgresql import UUID as PG_UUID
|
|
32
|
-
from sqlalchemy.engine.interfaces import Dialect
|
|
33
|
-
from sqlalchemy.types import TypeDecorator
|
|
34
|
-
|
|
35
|
-
import mlrun.common.db.dialects
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class DateTime(TypeDecorator):
|
|
39
|
-
impl = sqlalchemy.types.DateTime
|
|
40
|
-
cache_ok = True
|
|
41
|
-
precision: int = 3
|
|
42
|
-
|
|
43
|
-
def load_dialect_impl(
|
|
44
|
-
self,
|
|
45
|
-
dialect: Dialect,
|
|
46
|
-
) -> sqlalchemy.types.TypeEngine:
|
|
47
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.MYSQL:
|
|
48
|
-
return dialect.type_descriptor(
|
|
49
|
-
MYSQL_DATETIME(
|
|
50
|
-
fsp=self.precision,
|
|
51
|
-
timezone=True,
|
|
52
|
-
)
|
|
53
|
-
)
|
|
54
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL:
|
|
55
|
-
return dialect.type_descriptor(
|
|
56
|
-
PG_TIMESTAMP(
|
|
57
|
-
precision=self.precision,
|
|
58
|
-
timezone=True,
|
|
59
|
-
)
|
|
60
|
-
)
|
|
61
|
-
return dialect.type_descriptor(sqlalchemy.types.DateTime)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
class MicroSecondDateTime(DateTime):
|
|
65
|
-
cache_ok = True
|
|
66
|
-
precision: int = 6
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class Blob(TypeDecorator):
|
|
70
|
-
impl = sqlalchemy.types.LargeBinary
|
|
71
|
-
cache_ok = True
|
|
72
|
-
|
|
73
|
-
def load_dialect_impl(
|
|
74
|
-
self,
|
|
75
|
-
dialect: Dialect,
|
|
76
|
-
) -> sqlalchemy.types.TypeEngine:
|
|
77
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.MYSQL:
|
|
78
|
-
return dialect.type_descriptor(MEDIUMBLOB)
|
|
79
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL:
|
|
80
|
-
return dialect.type_descriptor(BYTEA)
|
|
81
|
-
return dialect.type_descriptor(self.impl)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
class Utf8BinText(TypeDecorator):
|
|
85
|
-
impl = Text
|
|
86
|
-
cache_ok = True
|
|
87
|
-
|
|
88
|
-
def load_dialect_impl(
|
|
89
|
-
self,
|
|
90
|
-
dialect: Dialect,
|
|
91
|
-
) -> sqlalchemy.types.TypeEngine:
|
|
92
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.MYSQL:
|
|
93
|
-
return dialect.type_descriptor(
|
|
94
|
-
sqlalchemy.dialects.mysql.VARCHAR(
|
|
95
|
-
collation="utf8_bin",
|
|
96
|
-
length=255,
|
|
97
|
-
)
|
|
98
|
-
)
|
|
99
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL:
|
|
100
|
-
# This collation is created as part of the database creation
|
|
101
|
-
return dialect.type_descriptor(
|
|
102
|
-
Text(
|
|
103
|
-
collation="utf8_bin",
|
|
104
|
-
)
|
|
105
|
-
)
|
|
106
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.SQLITE:
|
|
107
|
-
return dialect.type_descriptor(
|
|
108
|
-
Text(
|
|
109
|
-
collation="BINARY",
|
|
110
|
-
)
|
|
111
|
-
)
|
|
112
|
-
return dialect.type_descriptor(self.impl)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
class UuidType(TypeDecorator):
|
|
116
|
-
"""
|
|
117
|
-
A UUID type which stores as native UUID on Postgres (as_uuid=True)
|
|
118
|
-
and as 32-char hex strings on other dialects.
|
|
119
|
-
"""
|
|
120
|
-
|
|
121
|
-
impl = CHAR(32)
|
|
122
|
-
cache_ok = True
|
|
123
|
-
|
|
124
|
-
def load_dialect_impl(self, dialect: Dialect) -> sqlalchemy.types.TypeEngine:
|
|
125
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL:
|
|
126
|
-
return dialect.type_descriptor(PG_UUID(as_uuid=True))
|
|
127
|
-
return dialect.type_descriptor(CHAR(32))
|
|
128
|
-
|
|
129
|
-
def process_bind_param(
|
|
130
|
-
self,
|
|
131
|
-
value: Optional[Union[uuid.UUID, str]],
|
|
132
|
-
dialect: Dialect,
|
|
133
|
-
) -> Optional[Union[uuid.UUID, str]]:
|
|
134
|
-
if value is None:
|
|
135
|
-
return None
|
|
136
|
-
if isinstance(value, uuid.UUID):
|
|
137
|
-
return (
|
|
138
|
-
value
|
|
139
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL
|
|
140
|
-
else value.hex
|
|
141
|
-
)
|
|
142
|
-
if isinstance(value, str):
|
|
143
|
-
u = uuid.UUID(value)
|
|
144
|
-
return (
|
|
145
|
-
u
|
|
146
|
-
if dialect.name == mlrun.common.db.dialects.Dialects.POSTGRESQL
|
|
147
|
-
else u.hex
|
|
148
|
-
)
|
|
149
|
-
raise ValueError(f"Cannot bind UUID value {value!r}")
|
|
150
|
-
|
|
151
|
-
def process_result_value(
|
|
152
|
-
self, value: Optional[Union[uuid.UUID, bytes, str]], dialect: Dialect
|
|
153
|
-
) -> Optional[uuid.UUID]:
|
|
154
|
-
if value is None:
|
|
155
|
-
return None
|
|
156
|
-
return value if isinstance(value, uuid.UUID) else uuid.UUID(value)
|
|
157
|
-
|
|
158
|
-
def coerce_compared_value(self, op: Any, value: Any) -> TypeDecorator:
|
|
159
|
-
# ensure STR comparisons are coerced through this type
|
|
160
|
-
return self
|
mlrun/utils/db.py
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Iguazio
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import abc
|
|
16
|
-
import pickle
|
|
17
|
-
from datetime import datetime
|
|
18
|
-
|
|
19
|
-
from sqlalchemy.orm import class_mapper
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class BaseModel:
|
|
23
|
-
def to_dict(self, exclude=None, strip: bool = False):
|
|
24
|
-
"""
|
|
25
|
-
NOTE - this function (currently) does not handle serializing relationships
|
|
26
|
-
"""
|
|
27
|
-
exclude = exclude or []
|
|
28
|
-
mapper = class_mapper(self.__class__)
|
|
29
|
-
columns = [column.key for column in mapper.columns if column.key not in exclude]
|
|
30
|
-
|
|
31
|
-
def get_key_value(c):
|
|
32
|
-
# all (never say never) DB classes have "object" defined as "full_object"
|
|
33
|
-
if c == "object":
|
|
34
|
-
c = "full_object"
|
|
35
|
-
if isinstance(getattr(self, c), datetime):
|
|
36
|
-
return c, getattr(self, c).isoformat()
|
|
37
|
-
return c, getattr(self, c)
|
|
38
|
-
|
|
39
|
-
return dict(map(get_key_value, columns))
|
|
40
|
-
|
|
41
|
-
@abc.abstractmethod
|
|
42
|
-
def get_identifier_string(self):
|
|
43
|
-
"""
|
|
44
|
-
This method must be implemented by any subclass.
|
|
45
|
-
"""
|
|
46
|
-
pass
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
class HasStruct(BaseModel):
|
|
50
|
-
@property
|
|
51
|
-
def struct(self):
|
|
52
|
-
return pickle.loads(self.body)
|
|
53
|
-
|
|
54
|
-
@struct.setter
|
|
55
|
-
def struct(self, value):
|
|
56
|
-
self.body = pickle.dumps(value)
|
|
57
|
-
|
|
58
|
-
def to_dict(self, exclude=None, strip: bool = False):
|
|
59
|
-
"""
|
|
60
|
-
NOTE - this function (currently) does not handle serializing relationships
|
|
61
|
-
"""
|
|
62
|
-
exclude = exclude or []
|
|
63
|
-
exclude.append("body")
|
|
64
|
-
return super().to_dict(exclude, strip=strip)
|
|
65
|
-
|
|
66
|
-
@abc.abstractmethod
|
|
67
|
-
def get_identifier_string(self):
|
|
68
|
-
"""
|
|
69
|
-
This method must be implemented by any subclass.
|
|
70
|
-
"""
|
|
71
|
-
pass
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|