Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Why

Adds artifact management capabilities to the Clarifai Python SDK for storing/retrieving model weights, datasets, and other binary files with version control.

How

SDK Client Classes:

  • Artifact (clarifai/client/artifact.py): CRUD operations, listing, existence checks
  • ArtifactVersion (clarifai/client/artifact_version.py): Streaming upload/download with 14MB chunks, retry logic, progress tracking

Builder Pattern:

  • ArtifactBuilder (clarifai/runners/artifacts/artifact_builder.py): Orchestrates workflows, parses artifact paths

CLI Commands:

clarifai artifact list users/user123/apps/app456
clarifai artifact cp ./model.pt users/user123/apps/app456/artifacts/my-model
clarifai artifact get users/user123/apps/app456/artifacts/my-model
clarifai af ls users/user123/apps/app456  # alias support

Path format: users/{user_id}/apps/{app_id}/artifacts/{artifact_id}[/versions/{version_id}]

Tests

  • 85+ test methods across 5 test files
  • Unit tests with mocked gRPC/filesystem
  • CLI command validation
  • Error scenario coverage

Notes

  • Upgraded clarifai-grpc>=11.10.10 for Artifacts stub support
  • Follows pipeline/pipeline_step client separation pattern

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: nitinbhojwani <9331380+nitinbhojwani@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement artifact management system for Clarifai SDK Artifact Management System Implementation Dec 1, 2025
Copilot AI requested a review from nitinbhojwani December 1, 2025 13:51
Copilot finished work on behalf of nitinbhojwani December 1, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants