Skip to content

Commit 8d47cfe

Browse files
committed
fix: move server.run() to end of file to register all 13 tools
- Bug: if __name__ == '__main__': server.run() was at line 602 (mid-file) causing tools 9-13 (create_user, list_users, delete_user, manage_workspace, annotator_stats) to never be registered. - Fix: moved entry point to after all @server.tool() decorators.
1 parent 8b5c093 commit 8d47cfe

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/xfmr_zem/servers/argilla/server.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,6 @@ def agreement_score(
599599
return result
600600

601601

602-
if __name__ == "__main__":
603-
server.run()
604-
605-
606602
# =============================================================================
607603
# Tools 9-13: User / Annotator Management
608604
# =============================================================================
@@ -779,3 +775,10 @@ def annotator_stats(
779775
workspace=workspace,
780776
)
781777
return server.save_output(stats)
778+
779+
780+
# =============================================================================
781+
# Entry Point – phải đặt SAU khi tất cả tool đã đăng ký
782+
# =============================================================================
783+
if __name__ == "__main__":
784+
server.run()

0 commit comments

Comments
 (0)