upgini 1.2.102__py3-none-any.whl → 1.2.103__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.
- upgini/__about__.py +1 -1
- upgini/autofe/vector.py +33 -3
- upgini/data_source/data_source_publisher.py +2 -0
- {upgini-1.2.102.dist-info → upgini-1.2.103.dist-info}/METADATA +1 -1
- {upgini-1.2.102.dist-info → upgini-1.2.103.dist-info}/RECORD +7 -7
- {upgini-1.2.102.dist-info → upgini-1.2.103.dist-info}/WHEEL +0 -0
- {upgini-1.2.102.dist-info → upgini-1.2.103.dist-info}/licenses/LICENSE +0 -0
upgini/__about__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "1.2.
|
1
|
+
__version__ = "1.2.103"
|
upgini/autofe/vector.py
CHANGED
@@ -2,7 +2,7 @@ from typing import List, Optional
|
|
2
2
|
|
3
3
|
import pandas as pd
|
4
4
|
|
5
|
-
from upgini.autofe.operator import OperatorRegistry, PandasOperator, VectorizableMixin
|
5
|
+
from upgini.autofe.operator import OperatorRegistry, PandasOperator, ParametrizedOperator, VectorizableMixin
|
6
6
|
|
7
7
|
|
8
8
|
class Mean(PandasOperator, VectorizableMixin):
|
@@ -33,13 +33,43 @@ class Vectorize(PandasOperator, VectorizableMixin):
|
|
33
33
|
return pd.DataFrame(data).T.apply(lambda x: x.to_list(), axis=1)
|
34
34
|
|
35
35
|
|
36
|
-
class OnnxModel(PandasOperator, metaclass=OperatorRegistry):
|
36
|
+
class OnnxModel(PandasOperator, ParametrizedOperator, metaclass=OperatorRegistry):
|
37
37
|
name: str = "onnx"
|
38
|
+
score_name: str = "score"
|
38
39
|
is_vector: bool = True
|
39
40
|
output_type: Optional[str] = "float"
|
40
41
|
|
42
|
+
def to_formula(self) -> str:
|
43
|
+
return f"onnx_{self.score_name}"
|
41
44
|
|
42
|
-
|
45
|
+
@classmethod
|
46
|
+
def from_formula(cls, formula: str) -> Optional["OnnxModel"]:
|
47
|
+
if "(" in formula:
|
48
|
+
return None
|
49
|
+
if formula.startswith("onnx_"):
|
50
|
+
score_name = formula[len("onnx_"):]
|
51
|
+
return cls(score_name=score_name)
|
52
|
+
elif formula == "onnx": # for OperatorRegistry
|
53
|
+
return cls()
|
54
|
+
return None
|
55
|
+
|
56
|
+
|
57
|
+
class CatboostModel(PandasOperator, ParametrizedOperator, metaclass=OperatorRegistry):
|
43
58
|
name: str = "catboost"
|
59
|
+
score_name: str = "score"
|
44
60
|
is_vector: bool = True
|
45
61
|
output_type: Optional[str] = "float"
|
62
|
+
|
63
|
+
def to_formula(self) -> str:
|
64
|
+
return f"catboost_{self.score_name}"
|
65
|
+
|
66
|
+
@classmethod
|
67
|
+
def from_formula(cls, formula: str) -> Optional["CatboostModel"]:
|
68
|
+
if "(" in formula:
|
69
|
+
return None
|
70
|
+
if formula.startswith("catboost_"):
|
71
|
+
score_name = formula[len("catboost_"):]
|
72
|
+
return cls(score_name=score_name)
|
73
|
+
elif formula == "catboost": # for OperatorRegistry
|
74
|
+
return cls()
|
75
|
+
return None
|
@@ -501,6 +501,7 @@ class DataSourcePublisher:
|
|
501
501
|
input_names: List[str],
|
502
502
|
search_id: str,
|
503
503
|
date_column: Optional[str] = None,
|
504
|
+
score_name: Optional[str] = None,
|
504
505
|
model_type: Optional[Literal["ONNX", "CATBOOST"]] = None,
|
505
506
|
description: str = "",
|
506
507
|
):
|
@@ -510,6 +511,7 @@ class DataSourcePublisher:
|
|
510
511
|
"modelName": name,
|
511
512
|
"inputNames": input_names,
|
512
513
|
"dateColumn": date_column,
|
514
|
+
"scoreName": score_name,
|
513
515
|
"searchTaskId": search_id,
|
514
516
|
"modelType": model_type or "ONNX",
|
515
517
|
"description": description,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
upgini/__about__.py,sha256=
|
1
|
+
upgini/__about__.py,sha256=I4vADk6bg0T3SScsIWSCnJJu017_FbmnyOgKfo7j6K0,24
|
2
2
|
upgini/__init__.py,sha256=LXSfTNU0HnlOkE69VCxkgIKDhWP-JFo_eBQ71OxTr5Y,261
|
3
3
|
upgini/ads.py,sha256=nvuRxRx5MHDMgPr9SiU-fsqRdFaBv8p4_v1oqiysKpc,2714
|
4
4
|
upgini/dataset.py,sha256=e6JDYTZ2AwC5aF-dqclKZKkiKrHo2f6cFmMQO2ZZmjM,32724
|
@@ -21,7 +21,7 @@ upgini/autofe/groupby.py,sha256=IYmQV9uoCdRcpkeWZj_kI3ObzoNCNx3ff3h8sTL01tk,3603
|
|
21
21
|
upgini/autofe/operator.py,sha256=RB3rKMjFi5Cx81RiYXN3OTCuXjmvzmFKQrxn4h0Oclo,5219
|
22
22
|
upgini/autofe/unary.py,sha256=FFtvkQaT0cu_zPZ1jCLcsjik-UUh12qQFF3tUW8NqsE,6675
|
23
23
|
upgini/autofe/utils.py,sha256=dYrtyAM8Vcc_R8u4dNo54IsGrHKagTHDJTKhGho0bRg,2967
|
24
|
-
upgini/autofe/vector.py,sha256=
|
24
|
+
upgini/autofe/vector.py,sha256=r5H6DKT5f3KNjERpV2OOloZ96nDWkModXnpsqw_A77Q,2313
|
25
25
|
upgini/autofe/timeseries/__init__.py,sha256=PGwwDAMwvkXl3el12tXVEmZUgDUvlmIPlXtROm6bD18,738
|
26
26
|
upgini/autofe/timeseries/base.py,sha256=rWJqRuFAzTZEsUdWG5s1Vhif9zzRRmalASXvarufRxI,3610
|
27
27
|
upgini/autofe/timeseries/cross.py,sha256=BTINVwuZSbm_4NKkVm0FGM68SrvZLENZKXN7-UyvhYI,5319
|
@@ -31,7 +31,7 @@ upgini/autofe/timeseries/roll.py,sha256=zADKXU-eYWQnQ5R3am1yEal8uU6Tm0jLAixwPb_a
|
|
31
31
|
upgini/autofe/timeseries/trend.py,sha256=K1_iw2ko_LIUU8YCUgrvN3n0MkHtsi7-63-8x9er1k4,2129
|
32
32
|
upgini/autofe/timeseries/volatility.py,sha256=SvZfhM_ZAWCNpTf87WjSnZsnlblARgruDlu4By4Zvhc,8078
|
33
33
|
upgini/data_source/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
34
|
-
upgini/data_source/data_source_publisher.py,sha256=
|
34
|
+
upgini/data_source/data_source_publisher.py,sha256=XIl69POqrNYxNWOeN6nz6b4aqhDCJlnCJWzmzTyrxNQ,25363
|
35
35
|
upgini/mdc/__init__.py,sha256=iHJlXQg6xRM1-ZOUtaPSJqw5SpQDszvxp4LyqviNLIQ,1027
|
36
36
|
upgini/mdc/context.py,sha256=3u1B-jXt7tXEvNcV3qmR9SDCseudnY7KYsLclBdwVLk,1405
|
37
37
|
upgini/normalizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -71,7 +71,7 @@ upgini/utils/target_utils.py,sha256=i3Xt5l9ybB2_nF_ma5cfPuL3OeFTs2dY2xDI0p4Azpg,
|
|
71
71
|
upgini/utils/track_info.py,sha256=G5Lu1xxakg2_TQjKZk4b5SvrHsATTXNVV3NbvWtT8k8,5663
|
72
72
|
upgini/utils/ts_utils.py,sha256=26vhC0pN7vLXK6R09EEkMK3Lwb9IVPH7LRdqFIQ3kPs,1383
|
73
73
|
upgini/utils/warning_counter.py,sha256=-GRY8EUggEBKODPSuXAkHn9KnEQwAORC0mmz_tim-PM,254
|
74
|
-
upgini-1.2.
|
75
|
-
upgini-1.2.
|
76
|
-
upgini-1.2.
|
77
|
-
upgini-1.2.
|
74
|
+
upgini-1.2.103.dist-info/METADATA,sha256=6mwTuyiKQaeFeS-21qj_HWsgeaarwltXivPlDlcDmcI,49529
|
75
|
+
upgini-1.2.103.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
76
|
+
upgini-1.2.103.dist-info/licenses/LICENSE,sha256=5RRzgvdJUu3BUDfv4bzVU6FqKgwHlIay63pPCSmSgzw,1514
|
77
|
+
upgini-1.2.103.dist-info/RECORD,,
|
File without changes
|
File without changes
|