Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
==========

13.4.3 (2025-03-26)
---------------------

* Initial release for DSS 13.4.3

13.4.1 (2025-02-21)
---------------------

Expand Down
4 changes: 3 additions & 1 deletion dataikuapi/dss/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,10 @@ def get_client_as(self):
if self.client.api_key is not None:
return DSSClient(self.client.host, self.client.api_key, extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=not self.client._session.verify)
elif self.client.internal_ticket is not None:
verify = self.client._session.verify
no_check_certificate = verify if isinstance(verify, str) else not verify
return DSSClient(self.client.host, internal_ticket = self.client.internal_ticket,
extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=not self.client._session.verify)
extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=no_check_certificate)
else:
raise ValueError("Don't know how to proxy this client")

Expand Down
409 changes: 275 additions & 134 deletions dataikuapi/dss/document_extractor.py

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dataikuapi/dss/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def start_tool(self, type, data={}):
"""
.. caution::

Deprecated, this method will no longer be available for views (starting with DSS 13.4):
TAGS, CUSTOM_FIELDS, CONNECTIONS, COUNT_OF_RECORDS, FILESIZE, FILEFORMATS, RECIPES_ENGINES, RECIPES_CODE_ENVS, IMPALA_WRITE_MODE, HIVE_MODE, SPARK_CONFIG, SPARK_PIPELINES, SQL_PIPELINES, PARTITIONING, PARTITIONS, SCENARIOS, CREATION, LAST_MODIFICATION, LAST_BUILD, RECENT_ACTIVITY, WATCH.
It will be maintained for flow actions.
Deprecated, this method will no longer be available for views (starting with DSS 13.4):
TAGS, CUSTOM_FIELDS, CONNECTIONS, COUNT_OF_RECORDS, FILESIZE, FILEFORMATS, RECIPES_ENGINES, RECIPES_CODE_ENVS, IMPALA_WRITE_MODE, HIVE_MODE, SPARK_CONFIG, SPARK_PIPELINES, SQL_PIPELINES, PARTITIONING, PARTITIONS, SCENARIOS, CREATION, LAST_MODIFICATION, LAST_BUILD, RECENT_ACTIVITY, WATCH.
It will be maintained for flow actions.

Start a tool in the flow.

Expand Down
21 changes: 18 additions & 3 deletions dataikuapi/dss/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,29 @@ def add_text(self, text):
self.eq["queries"].append({"text": text})
return self

def add_image(self, image):
def add_image(self, image, text = None):
"""
Add an image to the embedding query.

:param image: Image content as bytes or str (base64)
:param text: Optional text (requires a multimodal model)
"""
query = {}

if isinstance(image, str):
self.eq["queries"].append({"inlineImage": image})
query["inlineImage"] = image
elif isinstance(image, bytes):
import base64
self.eq["queries"].append({"inlineImage": base64.b64encode(image).decode("utf8")})
query["inlineImage"] = base64.b64encode(image).decode("utf8")
else:
raise Exception("Expecting image to be an instance of str or bytes, got '%s' instead." % type(image) )

if text is not None:
query["text"] = text

if query:
self.eq["queries"].append(query)

return self

def new_guardrail(self, type):
Expand Down Expand Up @@ -255,6 +267,9 @@ def with_tool_calls(self, tool_calls, role="assistant"):
"""
Add tool calls to the completion query.

.. caution::
Tool calls support is experimental for locally-running Hugging Face models.

:param list[dict] tool_calls: Calls to tools that the LLM requested to use.
:param str role: The message role. Defaults to ``assistant``.
"""
Expand Down
6 changes: 3 additions & 3 deletions dataikuapi/dss/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -2363,9 +2363,9 @@ class DSSTimeseriesForecastingMLTaskSettings(AbstractTabularPredictionMLTaskSett
"SEASONAL_LOESS": PredictionAlgorithmMeta("seasonal_loess_timeseries", SeasonalLoessSettings),
"PROPHET": PredictionAlgorithmMeta("prophet_timeseries", ProphetSettings),
"GLUONTS_NPTS_FORECASTER": PredictionAlgorithmMeta("gluonts_npts_timeseries", GluonTSNPTSForecasterSettings),

"GLUONTS_TORCH_SIMPLE_FEEDFORWARD": PredictionAlgorithmMeta("gluonts_torch_simple_feed_forward_timeseries", GluonTSTorchSimpleFeedForwardSettings),
"GLUONTS_TORCH_DEEPAR": PredictionAlgorithmMeta("gluonts_torch_deepar_timeseries", GluonTSTorchDeepARSettings),
#
# "GLUONTS_TORCH_SIMPLE_FEEDFORWARD": PredictionAlgorithmMeta("gluonts_torch_simple_feed_forward_timeseries", GluonTSTorchSimpleFeedForwardSettings),
# "GLUONTS_TORCH_DEEPAR": PredictionAlgorithmMeta("gluonts_torch_deepar_timeseries", GluonTSTorchDeepARSettings),

"GLUONTS_SIMPLE_FEEDFORWARD": PredictionAlgorithmMeta("gluonts_simple_feed_forward_timeseries", GluonTSSimpleFeedForwardSettings),
"GLUONTS_DEEPAR": PredictionAlgorithmMeta("gluonts_deepar_timeseries", GluonTSDeepARSettings),
Expand Down
5 changes: 5 additions & 0 deletions dataikuapi/dss/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1582,6 +1582,11 @@ def update_variables(self, variables, type="standard"):

@property
def document_extractor(self):
"""

:returns: A handle to interact with a DSS-managed Document Extractor
:rtype: :class:`dataikuapi.dss.document_extractor.DocumentExtractor`
"""
return DocumentExtractor(self.client, self.project_key)

########################################################
Expand Down
2 changes: 1 addition & 1 deletion dataikuapi/dss/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def wait_for_completion(self, no_fail=False):
eb.sleep_next()

if self.outcome != 'SUCCESS' and no_fail == False:
raise DataikuException("Scenario run returned status %s" % outcome)
raise DataikuException("Scenario run returned status %s" % self.outcome)

@property
def running(self):
Expand Down
10 changes: 6 additions & 4 deletions dataikuapi/dssclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def __init__(self, host, api_key=None, internal_ticket=None, extra_headers=None,
self.internal_ticket = internal_ticket
self.host = host
self._session = Session()
if no_check_certificate:
self._session.verify = False
if no_check_certificate: # either True or a string in case of encrypted rpc
self._session.verify = no_check_certificate if isinstance(no_check_certificate, str) else False

if self.api_key is not None:
self._session.auth = HTTPBasicAuth(self.api_key, "")
Expand Down Expand Up @@ -414,7 +414,7 @@ def get_user(self, login):
"""
return DSSUser(self, login)

def create_user(self, login, password, display_name='', source_type='LOCAL', groups=None, profile='DATA_SCIENTIST'):
def create_user(self, login, password, display_name='', source_type='LOCAL', groups=None, profile='DATA_SCIENTIST', email=None):
"""
Create a user, and return a handle to interact with it

Expand All @@ -426,6 +426,7 @@ def create_user(self, login, password, display_name='', source_type='LOCAL', gro
:param str source_type: the type of new user. Admissible values are 'LOCAL' or 'LDAP'
:param list groups: the names of the groups the new user belongs to (defaults to `[]`)
:param str profile: The profile for the new user. Typical values (depend on your license): FULL_DESIGNER, DATA_DESIGNER, AI_CONSUMER, ...
:param str email: The email for the new user.

:return: A :class:`dataikuapi.dss.admin.DSSUser` user handle
"""
Expand All @@ -438,7 +439,8 @@ def create_user(self, login, password, display_name='', source_type='LOCAL', gro
"displayName" : display_name,
"sourceType" : source_type,
"groups" : groups,
"userProfile" : profile
"userProfile" : profile,
"email": email
})
return DSSUser(self, login)

Expand Down
4 changes: 3 additions & 1 deletion dataikuapi/govern/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ def get_client_as(self):
if self.client.api_key is not None:
return GovernClient(self.client.host, self.client.api_key, extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=not self.client._session.verify)
elif self.client.internal_ticket is not None:
verify = self.client._session.verify
no_check_certificate = verify if isinstance(verify, str) else not verify
return GovernClient(self.client.host, internal_ticket=self.client.internal_ticket,
extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=not self.client._session.verify)
extra_headers={"X-DKU-ProxyUser": self.login}, no_check_certificate=no_check_certificate)
else:
raise ValueError("Don't know how to proxy this client")

Expand Down
4 changes: 2 additions & 2 deletions dataikuapi/govern_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def __init__(self, host, api_key=None, internal_ticket=None, extra_headers=None,
self.internal_ticket = internal_ticket
self.host = host
self._session = Session()
if no_check_certificate:
self._session.verify = False
if no_check_certificate: # either True or a string in case of encrypted rpc
self._session.verify = no_check_certificate if isinstance(no_check_certificate, str) else False

if self.api_key is not None:
self._session.auth = HTTPBasicAuth(self.api_key, "")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup

VERSION = "13.4.1"
VERSION = "13.4.3"

long_description = (open('README').read() + '\n\n' +
open('HISTORY.txt').read())
Expand Down