Closed adaykoth closed 7 months ago
To update this: I've done a bit more testing and it appears that this does not generically return NULL. Instead what seems to happen is that the first model is called three times per row instead of three different models one time. This means that if you try to extract differently named outputs of the returned json, the return of the second and third model call will return null.
So as a minimal example:
SELECT core.test.model1!predict(0.1,0.1,0.1),
core.test.model2!predict(0.1,0.1,0.1);
will return identical values, even if calling the model 2 separately will return a different value to model 1.
So in essence you can call at most one modell per query currently.
Sorry for late reply. Given it is consistently reproducing for you with same signature functions, would you please confirm if you observe the same between two versions of same model? That is, store model2
as new version V2
inside model1
while keeping original as default version in model1
and call like:
WITH model2 AS model1 VERSION V2
SELECT mv!predict(0.1,0.1,0.1), model1!predict(0.1,0.1,0.1);
Just to update @adaykoth - We are still investigating this issue. I tried this and the resolution seems to be ok. We will keep you posted if we discover something
snowman#REGRESS@MYDB.MYSCHEMA>select current_date(),mydb.myschema.mod1!snore(1),mydb.myschema.mod2!snore(1),mydb.myschema.mod3!snore(1) from (select 1);
+----------------+-----------------------------+-----------------------------+-----------------------------+
| CURRENT_DATE() | MYDB.MYSCHEMA.MOD1!SNORE(1) | MYDB.MYSCHEMA.MOD2!SNORE(1) | MYDB.MYSCHEMA.MOD3!SNORE(1) |
|----------------+-----------------------------+-----------------------------+-----------------------------|
| 2024-03-05 | [ | [ | [ |
| | "my model1 - Zzz" | "my model2 - Zzz" | "my model3 - Zzz" |
| | ] | ] | ] |
+----------------+-----------------------------+-----------------------------+-----------------------------+
As you can see in the above example, I have three different models and each model is invoking its method.
Hi @adaykoth fyi the team is actively working on the fix.
Hi @adaykoth ,
We have identified the root cause and implemented the fix in the just released 1.4.0 version. You need to upgrade and re-log your model so that they could work in the same query. We are closing this issue, however, if you have any problems or find this issue still exists, please reopen it. Thank you for your support!
Suppose I have registered models m1, m2 and m3 in the core db under the schema models. The following query will return NULL for the second and third predict call:
Note that calling the models independently in a query produces correct results and switching the order of the model call also changes which model produces a non-null output. It is always the first one.