Skip to content

Commit 29722fb

Browse files
JWittmeyerlumburovskalinaanmarhindi
authored
v1.19.0 (#298)
* Added weak supervision failed notification * Org user search - Role SELECT ORG FIRT * Add coroutine check for non async clients. * sub ref --------- Co-authored-by: Lina <lina.lumburovska@kern.ai> Co-authored-by: anmarhindi <anmar.hindi@kern.ai>
1 parent 99cc940 commit 29722fb

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

controller/attribute/llm_response_tmpl.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,12 @@ async def get_chat_completion_async_4a90ecec_fc72_45af_ba0d_ae9a2dc4674c(
263263
response_format={"type": "json_object"},
264264
**kwargs,
265265
)
266+
266267
if close_after:
267-
await client.close()
268+
result = client.close()
269+
if asyncio.iscoroutine(result):
270+
await result
271+
268272
return completion
269273

270274

controller/notification/notification_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"docs": enums.DOCS.WEAK_SUPERVISION.value,
195195
},
196196
enums.NotificationType.WEAK_SUPERVISION_TASK_FAILED.value: {
197-
"message_template": "Could not start weak supervision.",
197+
"message_template": "Weak supervision failed.",
198198
"title": "Weak supervision",
199199
"level": enums.Notification.ERROR.value,
200200
"page": enums.Pages.INFORMATION_SOURCES.value,

controller/weak_supervision/manager.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ def execution_pipeline(
9090
except Exception as e:
9191
print(traceback.format_exc(), flush=True)
9292
general.rollback()
93+
create_notification(
94+
NotificationType.WEAK_SUPERVISION_TASK_FAILED,
95+
user_id,
96+
project_id,
97+
)
9398
weak_supervision.update_state(
9499
project_id,
95100
weak_supervision_task_id,

fast_api/routes/organization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def change_organization(request: Request, body: ChangeOrganizationBody = Body(..
184184
def get_user_roles(request: Request):
185185
auth_manager.check_admin_access(request.state.info)
186186
data = user_manager.get_user_roles()
187-
return pack_json_result(data)
187+
return pack_json_result(data, wrap_for_frontend=False)
188188

189189

190190
# in use admin-dashboard (08.01.25)

submodules/model

0 commit comments

Comments
 (0)