wizata-dsapi 2.2.0.dev26__tar.gz → 2.2.0.dev28__tar.gz

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.
Files changed (76) hide show
  1. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/PKG-INFO +1 -1
  2. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/mlmodel.py +11 -1
  3. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/python_package.py +3 -3
  4. wizata_dsapi-2.2.0.dev28/wizata_dsapi/version.py +1 -0
  5. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizata_dsapi_client.py +2 -2
  6. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/PKG-INFO +1 -1
  7. wizata_dsapi-2.2.0.dev26/wizata_dsapi/version.py +0 -1
  8. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/LICENSE.txt +0 -0
  9. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/README.rst +0 -0
  10. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/setup.cfg +0 -0
  11. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/setup.py +0 -0
  12. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/__init__.py +0 -0
  13. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_config.py +0 -0
  14. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_dto.py +0 -0
  15. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_interface.py +0 -0
  16. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/bucket.py +0 -0
  17. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/business_label.py +0 -0
  18. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection.py +0 -0
  19. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_discovery.py +0 -0
  20. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_policy.py +0 -0
  21. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_types.py +0 -0
  22. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/context.py +0 -0
  23. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dashboard.py +0 -0
  24. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dataframe_toolkit.py +0 -0
  25. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/datapoint.py +0 -0
  26. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/datastore.py +0 -0
  27. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/deployment.py +0 -0
  28. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/ds_dataframe.py +0 -0
  29. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dsapi_json_encoder.py +0 -0
  30. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_config.py +0 -0
  31. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_device.py +0 -0
  32. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_module.py +0 -0
  33. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_package.py +0 -0
  34. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/evaluation.py +0 -0
  35. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/execution.py +0 -0
  36. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/execution_log.py +0 -0
  37. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/experiment.py +0 -0
  38. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/formula.py +0 -0
  39. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/graylog_log.py +0 -0
  40. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/group_system.py +0 -0
  41. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/ilogger.py +0 -0
  42. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/insight.py +0 -0
  43. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/inventory.py +0 -0
  44. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/mobile_asset.py +0 -0
  45. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/model_toolkit.py +0 -0
  46. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/models/__init__.py +0 -0
  47. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/models/common.py +0 -0
  48. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/notification.py +0 -0
  49. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/paged_query_result.py +0 -0
  50. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/pipeline.py +0 -0
  51. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/pipeline_image.py +0 -0
  52. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plot.py +0 -0
  53. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/__init__.py +0 -0
  54. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/common.py +0 -0
  55. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/theme.py +0 -0
  56. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/product.py +0 -0
  57. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/request.py +0 -0
  58. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/script.py +0 -0
  59. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/scripts/__init__.py +0 -0
  60. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/scripts/common.py +0 -0
  61. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/search.py +0 -0
  62. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/solution_component.py +0 -0
  63. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/streamlit_utils.py +0 -0
  64. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/template.py +0 -0
  65. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/template_config.py +0 -0
  66. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/trigger.py +0 -0
  67. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/twin.py +0 -0
  68. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/twinregistration.py +0 -0
  69. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/user.py +0 -0
  70. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizard_function.py +0 -0
  71. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizard_request.py +0 -0
  72. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/words.py +0 -0
  73. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
  74. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
  75. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/requires.txt +0 -0
  76. {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev26
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
@@ -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:
@@ -6,13 +6,13 @@ importable where a pipeline runs (runners, pipeline images, edges) under its ori
6
6
  dotted name, so models pickled against it load unchanged.
7
7
 
8
8
  PythonPackage — one package, named as pip names it: the name is normalised the pip way
9
- (``XpertRef_Tools`` is ``xpertref-tools``). ``source`` says where its code comes from:
9
+ (``Plant_Models`` is ``plant-models``). ``source`` says where its code comes from:
10
10
 
11
11
  - ``upload``: pure-Python wheels uploaded one version at a time (option A);
12
12
  - ``git``: the ``packages/<name>/`` folder of the attached repository (option B), whose
13
13
  version is the commit a pipeline is read at.
14
14
 
15
- ``import_names`` are the top-level modules it provides (``xpertref``). ``versions`` is
15
+ ``import_names`` are the top-level modules it provides (``plant_models``). ``versions`` is
16
16
  filled on read only.
17
17
 
18
18
  PythonPackageVersion — one uploaded wheel of an ``upload`` package. Immutable: a version is
@@ -30,7 +30,7 @@ from typing import List, Optional
30
30
 
31
31
  def normalize_python_package_name(name: str) -> str:
32
32
  """
33
- A package name as pip compares it (PEP 503): ``XpertRef_Tools.v2`` -> ``xpertref-tools-v2``.
33
+ A package name as pip compares it (PEP 503): ``Plant_Models.v2`` -> ``plant-models-v2``.
34
34
  Validating it is the package client's job.
35
35
  """
36
36
  return re.sub(r"[-_.]+", "-", name).lower()
@@ -0,0 +1 @@
1
+ __version__ = "2.2.0.dev28"
@@ -1454,7 +1454,7 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
1454
1454
  description: str = None) -> PythonPackageVersion:
1455
1455
  """
1456
1456
  Upload a version of a Python package your pipelines import: the pure-Python wheel
1457
- ``python -m build --wheel`` makes (e.g. ``dist/xpertref-1.4.0-py3-none-any.whl``).
1457
+ ``python -m build --wheel`` makes (e.g. ``dist/plant_models-1.4.0-py3-none-any.whl``).
1458
1458
  Its name, version and requirements come from the wheel; the package is created by
1459
1459
  its first upload. A version is immutable: a fix is a new version.
1460
1460
 
@@ -1466,7 +1466,7 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
1466
1466
  if isinstance(wheel, (bytes, bytearray)):
1467
1467
  if not filename:
1468
1468
  raise ValueError("give the wheel's file name with its bytes "
1469
- "(e.g. xpertref-1.4.0-py3-none-any.whl)")
1469
+ "(e.g. plant_models-1.4.0-py3-none-any.whl)")
1470
1470
  data = bytes(wheel)
1471
1471
  else:
1472
1472
  path = str(wheel)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wizata_dsapi
3
- Version: 2.2.0.dev26
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
@@ -1 +0,0 @@
1
- __version__ = "2.2.0.dev26"