Skip to content

Commit

Permalink
Fix circular dependency in hsml (CONNECTION_SAAS_HOSTNAME)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversey committed Jul 16, 2024
1 parent ccdbb2c commit fba8473
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/hsml/client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from hsml.client.istio import base as ist_base
from hsml.client.istio import external as ist_external
from hsml.client.istio import internal as ist_internal
from hsml.connection import CONNECTION_SAAS_HOSTNAME
from hsml.constants import CONNECTION


_client_type = None
Expand Down Expand Up @@ -49,7 +49,7 @@ def init(
_client_type = client_type

global _saas_connection
_saas_connection = host == CONNECTION_SAAS_HOSTNAME
_saas_connection = host == CONNECTION.SAAS_HOSTNAME

global _hopsworks_client
if not _hopsworks_client:
Expand Down
2 changes: 0 additions & 2 deletions python/hsml/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
from requests.exceptions import ConnectionError


CONNECTION_SAAS_HOSTNAME = "c.app.hopsworks.ai"

HOPSWORKS_PORT_DEFAULT = 443
HOSTNAME_VERIFICATION_DEFAULT = True

Expand Down
4 changes: 4 additions & 0 deletions python/hsml/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
DEFAULT = dict() # used as default parameter for a class object


class CONNECTION:
SAAS_HOSTNAME = "c.app.hopsworks.ai"


class MODEL:
FRAMEWORK_TENSORFLOW = "TENSORFLOW"
FRAMEWORK_TORCH = "TORCH"
Expand Down

0 comments on commit fba8473

Please sign in to comment.