Skip to content

[BUG-python/deployment] Missing Workspace and Schema API Methods in Argilla V2 Migration #56

@JonnyTran

Description

@JonnyTran

Describe the bug
The recent migration to Argilla V2 has left critical workspace functionality missing from the Python client SDK. While argilla-v1/src/argilla_v1/client/workspaces.py had implemented methods such as add_schema, update_schemas, get_schemas, list_files, and delete_file, these methods are absent in the new argilla/src/argilla/_api/_workspaces.py implementation. This is despite the fact that the corresponding FastAPI endpoints in argilla-server are already implemented and intact.

Stacktrace and Code to create the bug

import argilla as rg

# This would work in argilla-v1
# workspace = rg.Workspace.from_name("my-workspace")
# schemas = workspace.get_schemas()
# workspace.add_schema(my_schema)

# In argilla v2, these methods no longer exist
workspace = rg.Workspace(name="my-workspace")
# AttributeError: 'Workspace' object has no attribute 'get_schemas'
schemas = workspace.get_schemas()

Expected behavior
The Argilla V2 Python client SDK should maintain the same workspace functionality as the previous version, allowing users to:

  • Add/update schemas to a workspace
  • Get schemas from a workspace
  • List files in a workspace
  • Delete files from a workspace

All these methods were available in argilla-v1 and are crucial for Extralit's functionality.

Environment:

  • Extralit/Argilla Version: v0.4.0
  • Argilla Server Version: v0.4.0
  • ElasticSearch Version: 8.15.0

Additional context
This is a parent issue to the related #53 issue. The migration of functionality needs to happen at two levels:

  1. First, migrate the missing methods from argilla-v1/src/argilla_v1/client/workspaces.py to the new argilla/src/argilla/_api/_workspaces.py
  2. Then, rebuild the CLI functionality to use these new methods

The most critical methods that need to be migrated are:

  • list_files
  • delete_file
  • add_document
  • get_documents
  • add_schema
  • get_schemas
  • update_schemas

The endpoints exist in the server's FastAPI implementation, but the Python client methods to access them are missing. This disconnect is blocking researchers from using Extralit with the latest Argilla version.

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions