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.
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/PKG-INFO +1 -1
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/mlmodel.py +11 -1
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/python_package.py +3 -3
- wizata_dsapi-2.2.0.dev28/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizata_dsapi_client.py +2 -2
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.2.0.dev26/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/LICENSE.txt +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/README.rst +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/setup.cfg +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/setup.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_discovery.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_policy.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/connection_types.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/deployment.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/edge_package.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/formula.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/inventory.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/product.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -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
|
-
(``
|
|
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 (``
|
|
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): ``
|
|
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/
|
|
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.
|
|
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 +0,0 @@
|
|
|
1
|
-
__version__ = "2.2.0.dev26"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wizata_dsapi-2.2.0.dev26 → wizata_dsapi-2.2.0.dev28}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|