wizata-dsapi 2.1.0.dev22__tar.gz → 2.1.0.dev23__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.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/PKG-INFO +1 -1
- wizata_dsapi-2.1.0.dev23/wizata_dsapi/version.py +1 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/wizata_dsapi_client.py +70 -60
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/PKG-INFO +1 -1
- wizata_dsapi-2.1.0.dev22/wizata_dsapi/version.py +0 -1
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/LICENSE.txt +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/README.rst +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/setup.cfg +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/setup.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/api_config.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/api_dto.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/api_interface.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/bucket.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/business_label.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/context.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/dashboard.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/dataframe_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/datapoint.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/datastore.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/deployment.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/ds_dataframe.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/dsapi_json_encoder.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/edge_config.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/edge_device.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/edge_module.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/evaluation.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/execution.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/execution_log.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/experiment.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/graylog_log.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/group_system.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/ilogger.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/insight.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/mlmodel.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/mobile_asset.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/model_toolkit.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/models/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/models/common.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/notification.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/paged_query_result.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/pipeline.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/pipeline_image.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/plot.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/plots/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/plots/common.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/plots/theme.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/request.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/script.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/scripts/__init__.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/scripts/common.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/search.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/solution_component.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/streamlit_utils.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/template.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/template_config.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/trigger.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/twin.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/twinregistration.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/user.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/wizard_function.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/wizard_request.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi/words.py +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/SOURCES.txt +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/dependency_links.txt +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/requires.txt +0 -0
- {wizata_dsapi-2.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.0.dev23"
|
|
@@ -1984,72 +1984,82 @@ class WizataDSAPIClient(ApiInterface, ApiDtoInterface):
|
|
|
1984
1984
|
else:
|
|
1985
1985
|
raise self.__raise_error(response)
|
|
1986
1986
|
|
|
1987
|
+
#: Executions are streamed per runner, and the two do not mix: a scheduled run
|
|
1988
|
+
#: is logged by the pipeline runner, an experiment by the experiment runner.
|
|
1989
|
+
#: Searching the wrong one returns a confident, complete, empty answer.
|
|
1990
|
+
PRODUCTION_RUNS = "pipeline_runner"
|
|
1991
|
+
EXPERIMENT_RUNS = "experiment_runner"
|
|
1992
|
+
|
|
1987
1993
|
def search_executions(self,
|
|
1994
|
+
search_query=None,
|
|
1995
|
+
service: str = PRODUCTION_RUNS,
|
|
1996
|
+
pipeline: str = None,
|
|
1997
|
+
twin: str = None,
|
|
1998
|
+
status=None,
|
|
1988
1999
|
page: int = 1,
|
|
1989
|
-
size: int = 20
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
2000
|
+
size: int = 20) -> PagedQueryResult:
|
|
2001
|
+
"""
|
|
2002
|
+
Search executions with filters, sorting and pagination.
|
|
2003
|
+
|
|
2004
|
+
Executions are searched per runner. ``service`` selects which: scheduled
|
|
2005
|
+
runs are logged by :attr:`PRODUCTION_RUNS`, experiments by
|
|
2006
|
+
:attr:`EXPERIMENT_RUNS`. They are separate streams, so looking in the wrong
|
|
2007
|
+
one answers "no executions" rather than telling you that you asked the
|
|
2008
|
+
wrong question.
|
|
2009
|
+
|
|
2010
|
+
:param search_query: SearchQuery or dict for the full query. When given,
|
|
2011
|
+
the convenience arguments below are ignored.
|
|
2012
|
+
:param service: which runner's executions to search.
|
|
2013
|
+
:param pipeline: pipeline KEY, not id - executions are labelled by key.
|
|
2014
|
+
:param twin: twin hardware id.
|
|
2015
|
+
:param status: ExecutionStatus, or its value.
|
|
2016
|
+
:param page: page number, from 1.
|
|
2017
|
+
:param size: results per page.
|
|
2018
|
+
:return: PagedQueryResult with Execution results.
|
|
1996
2019
|
"""
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
)
|
|
2014
|
-
|
|
2015
|
-
if sort not in ["id", "pipelineId", "twinId", "templateId",
|
|
2016
|
-
"createdDate" , "createdById",
|
|
2017
|
-
"updatedDate", "updatedById",
|
|
2018
|
-
"status"]:
|
|
2019
|
-
raise ValueError("invalid sort column")
|
|
2020
|
-
|
|
2021
|
-
parameter_str = "?page=" + str(page) + "&size=" + str(size) + "&sort=" + str(sort) + "&direction=" + str(direction)
|
|
2022
|
-
|
|
2023
|
-
if pipeline_id is not None:
|
|
2024
|
-
parameter_str += "&pipelineId=" + sanitize_url_parameter(str(pipeline_id))
|
|
2025
|
-
|
|
2026
|
-
if twin_id is not None:
|
|
2027
|
-
parameter_str += "&twinId=" + sanitize_url_parameter(str(twin_id))
|
|
2028
|
-
|
|
2029
|
-
if template_id is not None:
|
|
2030
|
-
parameter_str += "&templateId=" + sanitize_url_parameter(str(template_id))
|
|
2031
|
-
|
|
2032
|
-
if status is not None:
|
|
2033
|
-
if not isinstance(status, ExecutionStatus):
|
|
2034
|
-
raise ValueError(f'status is not a valid ExecutionStatus')
|
|
2035
|
-
parameter_str += "&status=" + sanitize_url_parameter(status.value)
|
|
2020
|
+
if search_query is None:
|
|
2021
|
+
search_query = SearchQuery()
|
|
2022
|
+
search_query.page = page
|
|
2023
|
+
search_query.size = size
|
|
2024
|
+
search_query.service_name = service
|
|
2025
|
+
filters = {}
|
|
2026
|
+
if pipeline is not None:
|
|
2027
|
+
filters["pipeline"] = {"eq": str(pipeline)}
|
|
2028
|
+
if twin is not None:
|
|
2029
|
+
filters["twin"] = {"eq": str(twin)}
|
|
2030
|
+
if status is not None:
|
|
2031
|
+
value = status.value if isinstance(status, ExecutionStatus) else status
|
|
2032
|
+
filters["status"] = {"eq": str(value)}
|
|
2033
|
+
search_query.filters = filters
|
|
2034
|
+
elif isinstance(search_query, dict):
|
|
2035
|
+
search_query = SearchQuery.from_dict(search_query)
|
|
2036
2036
|
|
|
2037
|
-
response = requests.
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
query.total = int(response_obj["total"])
|
|
2044
|
-
query.results = []
|
|
2045
|
-
for obj in response_obj["results"]:
|
|
2046
|
-
execution = Execution()
|
|
2047
|
-
execution.from_json(obj)
|
|
2048
|
-
query.results.append(execution)
|
|
2049
|
-
return query
|
|
2050
|
-
else:
|
|
2037
|
+
response = requests.post(
|
|
2038
|
+
self.__url() + "execute/search",
|
|
2039
|
+
headers=self.__header(),
|
|
2040
|
+
data=json.dumps(search_query.to_dict())
|
|
2041
|
+
)
|
|
2042
|
+
if response.status_code != 200:
|
|
2051
2043
|
raise self.__raise_error(response)
|
|
2052
2044
|
|
|
2045
|
+
body = response.json()
|
|
2046
|
+
# PagedQueryResult refuses a null sort, so a response that omits it would
|
|
2047
|
+
# raise on an answer that succeeded. The executions endpoint orders by
|
|
2048
|
+
# timestamp descending unless told otherwise; say so rather than break.
|
|
2049
|
+
query = PagedQueryResult(
|
|
2050
|
+
page=body.get("page", page),
|
|
2051
|
+
size=body.get("size", size),
|
|
2052
|
+
sort=body.get("sort") or "timestamp",
|
|
2053
|
+
direction=body.get("direction") or "desc"
|
|
2054
|
+
)
|
|
2055
|
+
query.total = int(body.get("total", 0))
|
|
2056
|
+
# ExecutionLog, not Execution: this endpoint answers with log rows, whose
|
|
2057
|
+
# id is a uuid and whose pipeline, twin and template are keys rather than
|
|
2058
|
+
# ids. Execution.from_json reads id as an int and raises on the first row.
|
|
2059
|
+
query.results = [ExecutionLog.from_dict(obj)
|
|
2060
|
+
for obj in body.get("results", [])]
|
|
2061
|
+
return query
|
|
2062
|
+
|
|
2053
2063
|
def search_execution(self, search_query=None) -> PagedQueryResult:
|
|
2054
2064
|
"""
|
|
2055
2065
|
search executions using filters, sorting and pagination via POST.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.0.dev22"
|
|
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.1.0.dev22 → wizata_dsapi-2.1.0.dev23}/wizata_dsapi.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|