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
6 changes: 6 additions & 0 deletions HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Changelog
==========



14.5.0 (2026-04-17)
-------------------

* Initial release for DSS 14.5.0

14.4.4 (2026-04-15)
-------------------

Expand Down
32 changes: 30 additions & 2 deletions dataikuapi/dss/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .future import DSSFuture
from .local_model import DSSLocalModel
import json
import warnings
import logging
Expand Down Expand Up @@ -267,7 +268,35 @@ def set_definition(self, definition):
return self.client._perform_json(
"PUT", "/admin/connections/%s" % self.name,
body = definition)



def list_local_models(self):
"""
:returns: List local models defined in this connection.
:rtype: list[:class:`~dataikuapi.dss.local_model.DSSLocalModel`]
:raises Exception: If this connection is not of type HuggingFaceLocal.
"""
definition = self.get_definition()
if definition.get("type") != "HuggingFaceLocal":
raise Exception("Connection %s is not a HuggingFaceLocal connection" % self.name)
params = definition.get("params") or {}
models = params.get("models") or []
return [DSSLocalModel(self.client, self.name, model.get("id")) for model in models]

def get_local_model(self, model_id):
"""
Get a handle on this local model.

:param str model_id: Identifier of the model.
:rtype: :class:`~dataikuapi.dss.local_model.DSSLocalModel`
"""
if not model_id.strip():
raise ValueError("model_id must be a non-empty string")
if not self.name.strip():
raise ValueError("connection_name must be a non-empty string")

return DSSLocalModel(self.client, self.name, model_id)

########################################################
# Security
########################################################
Expand Down Expand Up @@ -3361,4 +3390,3 @@ def get_counter(self, id):
:rtype: dict
"""
return next((counter for counter in self.counters if counter["id"] == id), None)

Loading