Skip to content

Commit da65034

Browse files
committed
Remove old api methods for managing clusters.
1 parent d186fb2 commit da65034

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

langchain_bytez/BytezModelMixin.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -553,20 +553,6 @@ async def _acall(
553553

554554
return text
555555

556-
def start_cluster(self):
557-
payload = {"capacity": self.capacity, "timeout": self.timeout}
558-
return self._make_request(method="put", payload=payload)
559-
560-
def get_cluster(self):
561-
return self._make_request(method="get")
562-
563-
def update_cluster(self):
564-
payload = {"capacity": self.capacity, "timeout": self.timeout}
565-
return self._make_request(method="patch", payload=payload)
566-
567-
def shutdown_cluster(self):
568-
return self._make_request(method="delete")
569-
570556

571557
def _convert_message_to_dict(message: BaseMessage) -> dict:
572558
"""Convert a LangChain message to a dictionary.

langchain_bytez/test.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -78,42 +78,6 @@ async def run_async_test():
7878
bytez_chat_model_llama,
7979
]
8080

81-
def shutdown_models():
82-
for model in models:
83-
try:
84-
model.shutdown_cluster()
85-
except Exception as exception:
86-
print(f"{model.model_id}", exception)
87-
88-
def start_models():
89-
for model in models:
90-
try:
91-
model.start_cluster()
92-
except Exception as exception:
93-
print(f"{model.model_id}", exception)
94-
95-
result = model.get_cluster()
96-
status = result["status"]
97-
98-
while result["status"] == "loading":
99-
result = model.get_cluster()
100-
status = result["status"]
101-
102-
print(f"{model.model_id} status: {status}")
103-
104-
time.sleep(5)
105-
106-
if status == "on":
107-
continue
108-
109-
raise Exception(
110-
f"{model.model_id} - Cluster failed to create with status: {status}"
111-
)
112-
113-
start_models()
114-
115-
# shutdown_models()
116-
11781
tests = [
11882
#
11983
# interface tests
@@ -160,7 +124,6 @@ def start_models():
160124

161125
print_text("\n\n>>>>>>>>>> Tests pass <<<<<<<<<<<", color="blue")
162126

163-
# shutdown_models()
164127
pass
165128

166129

0 commit comments

Comments
 (0)