wizata-dsapi 2.2.0.dev27__py3-none-any.whl → 2.2.0.dev28__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.
wizata_dsapi/mlmodel.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from typing import List, Iterator, Union, Optional
2
2
  import os
3
3
  from .api_dto import ApiDto, ApiDtoInterface
4
+ from .script import ScriptType
4
5
  from datetime import datetime, timezone
5
6
 
6
7
 
@@ -438,6 +439,9 @@ class MLModelConfig(ApiDto):
438
439
  :ivar str source: define name of model storage to use 'wizata'.
439
440
  :ivar str|list target_feat: target feature name(s) to remove from df in 'predict' mode.
440
441
  :ivar str train_script: name of function referencing the script to train the model.
442
+ :ivar ScriptType train_script_type: the trainer's type (JSON ``train_script_type``): ``raw``
443
+ for a trainer kept in the attached git repository; when absent it is inferred, built-in
444
+ (``wizata.*``) or uploaded with the SDK (DEV-6125).
441
445
  :ivar float train_test_split_pct: percentage repartition to split the data for training and scoring.
442
446
  :ivar str train_test_split_type: type of splitting desired to split the train dataframe.
443
447
  :ivar bool output_append: true - default - append output to input dataframe. false to retrieve only 'predict' column(s).
@@ -464,11 +468,13 @@ class MLModelConfig(ApiDto):
464
468
  by_twin: bool = False,
465
469
  by_property: bool = False,
466
470
  property_name: str = None,
467
- source: str = "wizata"
471
+ source: str = "wizata",
472
+ train_script_type=None
468
473
  ):
469
474
 
470
475
  # training
471
476
  self.train_script = train_script
477
+ self.train_script_type = ScriptType(train_script_type) if train_script_type is not None else None
472
478
  self.train_test_split_pct = train_test_split_pct
473
479
  self.train_test_split_type = train_test_split_type
474
480
  self.function = function
@@ -535,6 +541,8 @@ class MLModelConfig(ApiDto):
535
541
  # training info
536
542
  if "train_script" in obj.keys() and obj["train_script"] is not None:
537
543
  self.train_script = obj["train_script"]
544
+ if obj.get("train_script_type") is not None:
545
+ self.train_script_type = ScriptType(obj["train_script_type"])
538
546
  if "train_test_split_pct" in obj.keys() and obj["train_test_split_pct"] is not None:
539
547
  self.train_test_split_pct = float(obj["train_test_split_pct"])
540
548
  if "train_test_split_type" in obj.keys() and obj["train_test_split_type"] is not None:
@@ -612,6 +620,8 @@ class MLModelConfig(ApiDto):
612
620
  # training info
613
621
  if self.train_script is not None:
614
622
  obj["train_script"] = str(self.train_script)
623
+ if getattr(self, "train_script_type", None) is not None:
624
+ obj["train_script_type"] = self.train_script_type.value
615
625
  if self.train_test_split_pct is not None:
616
626
  obj["train_test_split_pct"] = float(self.train_test_split_pct)
617
627
  if self.train_test_split_type is not None:
wizata_dsapi/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.2.0.dev27"
1
+ __version__ = "2.2.0.dev28"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev27
3
+ Version: 2.2.0.dev28
4
4
  Summary: Wizata Data Science Toolkit
5
5
  Author: Wizata S.A.
6
6
  Author-email: info@wizata.com
@@ -30,7 +30,7 @@ wizata_dsapi/group_system.py,sha256=6rUKe0_J3YWACysyBlzuw_TEpKNXgLOMxhpWsNxOzwY,
30
30
  wizata_dsapi/ilogger.py,sha256=YKBTRp7pHYtBlnzroGRPT91_bMVJT93Pft3fUGcFSIM,488
31
31
  wizata_dsapi/insight.py,sha256=ABFZ04DqYxxzqAEfU1tzlTZqqrigM-zN-8Lbetko3g0,6468
32
32
  wizata_dsapi/inventory.py,sha256=r6TZDRTMEWeKDu2l2cL1K2vJ8etdjTEGPsMt3adcNgw,26985
33
- wizata_dsapi/mlmodel.py,sha256=ezgln6vyNGqEw7mD4P2YQZxHm5rXGqM9YW40eS09A8Q,26595
33
+ wizata_dsapi/mlmodel.py,sha256=fgfzdHvNQFuPkR_eReXWNpnoiKWzjSB1oYEmm5HVHc8,27286
34
34
  wizata_dsapi/mobile_asset.py,sha256=FBEvrOaXkT8YaLv1coemqNFJaoY-NVUcgNKPFgUzfP4,7631
35
35
  wizata_dsapi/model_toolkit.py,sha256=UNyw5CFSgZeXydQFsiDIRTjoMeqIsdyIIuiwumLW5bA,1574
36
36
  wizata_dsapi/notification.py,sha256=rzAo0e-LcGqsmatSlZL3YhUu6JvDj6p643CxDfI9nMc,24147
@@ -51,7 +51,7 @@ wizata_dsapi/trigger.py,sha256=waOX2AhrLvFzNFRQ535j6iemgg_QJP2QsWGL2ipljFg,8848
51
51
  wizata_dsapi/twin.py,sha256=8AnrxSaL7dMrILXJ3-GGmmUz078j3qqwzDTe6i86xqA,12672
52
52
  wizata_dsapi/twinregistration.py,sha256=iXt55AVGAQNl0jmxa3ZVynPqlSsIunFf4sLfp-MWTw0,13244
53
53
  wizata_dsapi/user.py,sha256=-hchKAMZULu9P00RUHDqu_5AT4NI5BYOJd8XCBrt3eQ,1950
54
- wizata_dsapi/version.py,sha256=-O4Jjc54Pnm7YwfkQ6rMh5IuguviteSQhQGRRgCWFgk,28
54
+ wizata_dsapi/version.py,sha256=wpXjQQA6bBSpurnYdLwjUJLEfpD9VHd_fGDkjv7feb0,28
55
55
  wizata_dsapi/wizard_function.py,sha256=RbM7W7Gf-6Rhp_1dU9DBYkHaciknGAGvuAndhAS_vyo,942
56
56
  wizata_dsapi/wizard_request.py,sha256=v6BaqKLKvTWmUSo0_gda9FabAQz5x_-GOH1Av50GzFo,3762
57
57
  wizata_dsapi/wizata_dsapi_client.py,sha256=wfTiSSakIub_F6V4PCt0tWnZp8PA8lkGma1HXfcfZ2A,141457
@@ -63,8 +63,8 @@ wizata_dsapi/plots/common.py,sha256=7F4WMBaddubnCpdSafgaI9U9Sz0Sngg0VREP_vnIMno,
63
63
  wizata_dsapi/plots/theme.py,sha256=D4sSgEwabXVxF3z1GV8DivXJbbY61KgxXAWfjUbNDAc,3594
64
64
  wizata_dsapi/scripts/__init__.py,sha256=9fRdTMuuXcqMkIsUPf5dwFsTWwBzKteQdAMVkyy2acQ,212
65
65
  wizata_dsapi/scripts/common.py,sha256=8LJK23Za0Yy4Dda1feKpKELav8806MH-hxFJYrklVOY,14758
66
- wizata_dsapi-2.2.0.dev27.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
67
- wizata_dsapi-2.2.0.dev27.dist-info/METADATA,sha256=Ia_nGFWPSPQPiV2mh5okzm9bLLjwraTe-ODncBUTEn4,14038
68
- wizata_dsapi-2.2.0.dev27.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
69
- wizata_dsapi-2.2.0.dev27.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
70
- wizata_dsapi-2.2.0.dev27.dist-info/RECORD,,
66
+ wizata_dsapi-2.2.0.dev28.dist-info/licenses/LICENSE.txt,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
67
+ wizata_dsapi-2.2.0.dev28.dist-info/METADATA,sha256=m7MV_YewvRfGwPsg09fi_8YT2UQR0DHQ_o6EhUgbVJs,14038
68
+ wizata_dsapi-2.2.0.dev28.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
69
+ wizata_dsapi-2.2.0.dev28.dist-info/top_level.txt,sha256=-OeTJbEnh5DuWyTOHtvw0Dw3LRg3G27TNS6W4ZtfwPs,13
70
+ wizata_dsapi-2.2.0.dev28.dist-info/RECORD,,