Skip to content

Commit bbc5363

Browse files
committed
fixed imports
1 parent 7edf353 commit bbc5363

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/sasctl/_services/model_publish.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import re
1010

1111
from .service import Service
12-
from .. import services
12+
from .model_repository import ModelRepository
1313

1414

1515
class ModelPublish(Service):
@@ -20,6 +20,7 @@ class ModelPublish(Service):
2020
"""
2121

2222
_SERVICE_ROOT = '/modelPublish'
23+
_model_repository = ModelRepository()
2324

2425
@staticmethod
2526
def _publish_name(name):
@@ -86,14 +87,14 @@ def publish_model(cls, model, destination, name=None, code=None,
8687
'': ''
8788
}
8889

89-
model = services.model_repository.get_model(model)
90-
model_uri = services.model_repository.get_model_link(model, 'cls')
90+
model = cls._model_repository.get_model(model)
91+
model_uri = cls._model_repository.get_model_link(model, 'cls')
9192

9293
# Get score code from registry if no code specified
9394
if code is None:
94-
code_link = services.model_repository.get_model_link(model,
95-
'scoreCode',
96-
True)
95+
code_link = cls._model_repository.get_model_link(model,
96+
'scoreCode',
97+
True)
9798
if code_link:
9899
code = cls.get(code_link['href'])
99100

0 commit comments

Comments
 (0)