-
Notifications
You must be signed in to change notification settings - Fork 22
feat: python client; resolves #44 #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ce and artifact downloading - Deleted `download_artifacts.py` and `inference.py` scripts as they are now replaced by CLI commands. - Updated CLI commands to improve user experience and added progress tracking for downloads and extractions. - Enhanced inference configuration to support backward compatibility for checkpoint paths. - Updated documentation in the inference configuration YAML file to clarify model types and embedding options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a first-class Python client (TranscriptFormerClient) that enables programmatic inference and downloads for TranscriptFormer models. The client provides in-memory inference operations that return AnnData objects directly, mirroring CLI configuration behavior while offering a simplified API.
Key Changes
- Adds Python client with
inference(),download_model(),download_data(), anddownload_dataset()methods - Refactors config merging logic into reusable utility for consistency between CLI and client
- Enhances inference configuration with new
checkpoint_pathandmodel_typefields
Reviewed Changes
Copilot reviewed 10 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/transcriptformer/client/client.py | Core client implementation with inference and download methods |
| src/transcriptformer/config/build_config.py | Shared config merging utility extracted from CLI |
| src/transcriptformer/data/dataclasses.py | Added checkpoint_path and model_type fields to InferenceConfig |
| src/transcriptformer/cli/inference.py | Refactored to use shared config merging utility |
| src/transcriptformer/cli/download_artifacts.py | Performance improvements to progress tracking |
| src/transcriptformer/init.py | Package-level client exports |
| README.md | Documentation for Python client usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
Introduce a first-class Python client (TranscriptFormerClient) for inference and artifact/data downloads. The client mirrors the CLI configuration behavior while providing a simple, programmatic API that returns an in-memory AnnData object.
Key Features
Convenience downloads:
API Surface