{"id":26063785,"url":"https://github.com/priorlabs/tabpfn-client","last_synced_at":"2025-05-16T11:03:44.429Z","repository":{"id":196868304,"uuid":"671538519","full_name":"PriorLabs/tabpfn-client","owner":"PriorLabs","description":"⚡ Easy API access to the tabular foundation model TabPFN ⚡","archived":false,"fork":false,"pushed_at":"2025-05-08T14:15:03.000Z","size":343,"stargazers_count":161,"open_issues_count":11,"forks_count":17,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-08T15:26:40.427Z","etag":null,"topics":["data-science","foundation-models","machine-learning","tabpfn","tabular-data"],"latest_commit_sha":null,"homepage":"https://www.priorlabs.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PriorLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-07-27T14:46:50.000Z","updated_at":"2025-05-08T14:15:05.000Z","dependencies_parsed_at":"2023-10-04T16:12:44.088Z","dependency_job_id":"abd0a4cb-7814-4f15-8b38-ee6e74dc4778","html_url":"https://github.com/PriorLabs/tabpfn-client","commit_stats":null,"previous_names":["liam-sbhoo/tabpfn-client","automl/tabpfn-client","priorlabs/tabpfn-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2Ftabpfn-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2Ftabpfn-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2Ftabpfn-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PriorLabs%2Ftabpfn-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PriorLabs","download_url":"https://codeload.github.com/PriorLabs/tabpfn-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254518383,"owners_count":22084374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","foundation-models","machine-learning","tabpfn","tabular-data"],"created_at":"2025-03-08T17:18:58.814Z","updated_at":"2025-05-16T11:03:44.374Z","avatar_url":"https://github.com/PriorLabs.png","language":"Python","readme":"# TabPFN Client\n\n[![PyPI version](https://badge.fury.io/py/tabpfn-client.svg)](https://badge.fury.io/py/tabpfn-client)\n[![Discord](https://img.shields.io/discord/1285598202732482621?color=7289da\u0026label=Discord\u0026logo=discord\u0026logoColor=ffffff)](https://discord.com/channels/1285598202732482621/)\n[![colab](https://colab.research.google.com/assets/colab-badge.svg)](https://tinyurl.com/tabpfn-colab-online)\n[![Documentation](https://img.shields.io/badge/docs-priorlabs.ai-blue)](https://priorlabs.ai/docs)\n[![Twitter Follow](https://img.shields.io/twitter/follow/Prior_Labs?style=social)](https://twitter.com/Prior_Labs)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python Versions](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)](https://pypi.org/project/tabpfn-client/)\n![Last Commit](https://img.shields.io/github/last-commit/automl/tabpfn-client)\n\nTabPFN is a foundation model for tabular data that outperforms traditional methods while being dramatically faster. This client library provides easy access to the TabPFN API, enabling state-of-the-art tabular machine learning in just a few lines of code.\n\n📚 For detailed usage examples and best practices, check out our [Interactive Colab Tutorial](https://tinyurl.com/tabpfn-colab-online)\n\n## ⚠️ Alpha Release Note\n\nThis is an alpha release. While we've tested it thoroughly in our use cases, you may encounter occasional issues. We appreciate your understanding and feedback as we continue to improve the service.\n\nThis is a cloud-based service. Your data will be sent to our servers for processing.\n\n- Do NOT upload any Personally Identifiable Information (PII)\n- Do NOT upload any sensitive or confidential data\n- Do NOT upload any data you don't have permission to share\n- Consider anonymizing or pseudonymizing your data before upload\n- Review your organization's data sharing policies before use\n\n## 🌐 TabPFN Ecosystem\n\nChoose the right TabPFN implementation for your needs:\n\n- **TabPFN Client (this repo)**: Easy-to-use API client for cloud-based inference\n- **[TabPFN Extensions](https://github.com/priorlabs/tabpfn-extensions)**: Community extensions and integrations\n- **[TabPFN](https://github.com/priorlabs/tabpfn)**: Core implementation for local deployment and research\n- **[TabPFN UX](https://ux.priorlabs.ai)**: No-code TabPFN usage\n\n## 🏁 Quick Start\n\n### Installation\n\n```bash\npip install tabpfn-client\n```\n\n### Basic Usage\n\n```python\nfrom tabpfn_client import init, TabPFNClassifier, TabPFNRegressor\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\n# Load an example dataset\n\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)\n\n# Use it like any sklearn model\nmodel = TabPFNClassifier()\nmodel.fit(X_train, y_train)\n# Get predictions\npredictions = model.predict(X_test)\n# Get probability estimates\nprobabilities = model.predict_proba(X_test)\n```\n\n### Best Results\n\nFor optimal performance, use the `AutoTabPFNClassifier` or `AutoTabPFNRegressor` for post-hoc ensembling. These can be found in the [TabPFN Extensions](https://github.com/PriorLabs/tabpfn-extensions) repository. Post-hoc ensembling combines multiple TabPFN models into an ensemble.\n\n## 🔑 Authentication\n\n### Load Your Token\n\n```python\nimport tabpfn_client\ntoken = tabpfn_client.get_access_token()\n```\n\nand login (on another machine) using your access token, skipping the interactive flow, use:\n\n```python\ntabpfn_client.set_access_token(token)\n```\n\n## 🤝 Join Our Community\n\nWe're building the future of tabular machine learning and would love your involvement! Here's how you can participate and get help:\n\n1. **Try TabPFN**: Use it in your projects and share your experience\n2. **Connect \u0026 Learn**:\n   - Join our [Discord Community](https://discord.gg/VJRuU3bSxt) for discussions and support\n   - Read our [Documentation](https://priorlabs.ai/) for detailed guides\n   - Check out [GitHub Issues](https://github.com/automl/tabpfn-client/issues) for known issues and feature requests\n3. **Contribute**:\n   - Report bugs or request features through issues\n   - Submit pull requests (see development guide below)\n   - Share your success stories and use cases\n4. **Stay Updated**: Star the repo and join Discord for the latest updates\n\n## 📊 Usage Limits\n\n### API Cost Calculation\n\nEach API request consumes usage credits based on the following formula:\n\n```python\napi_cost = (num_train_rows + num_test_rows) * num_cols * n_estimators\n```\n\nWhere `n_estimators` defaults to:\n\n- 4 for classification tasks\n- 8 for regression tasks\n\nPer day the current prediction allowance is 5,000,000 cells. We will adjust this limit based on usage patterns.\n\n### Monitoring Usage\n\nTrack your API usage through response headers:\n\n- `X-RateLimit-Limit`: Your total allowed usage\n- `X-RateLimit-Remaining`: Remaining usage\n- `X-RateLimit-Reset`: Reset timestamp (UTC)\n\nUsage limits reset daily at 00:00:00 UTC.\n\n### Size Limitations\n\n1. Maximum total cells per request must be below 500,000:\n\n```python\nmax_cells = (num_train_rows + num_test_rows) * num_cols\n```\n\n2. For regression with full output (`return_full_output=True`), the number of test samples must be below 500:\n\n```python\nif task == 'regression' and return_full_output and num_test_samples \u003e 500:\n    raise ValueError(\"Cannot return full output for regression with \u003e500 test samples\")\n```\n\nThese limits will be increased in future releases.\n\n## Access/Delete Personal Information\n\nYou can use our `UserDataClient` to access and delete personal information.\n\n```python\nfrom tabpfn_client import UserDataClient\n\nprint(UserDataClient.get_data_summary())\n```\n\n## 📚 Citation\n\n```bibtex\n@article{hollmann2025tabpfn,\n title={Accurate predictions on small data with a tabular foundation model},\n author={Hollmann, Noah and M{\\\"u}ller, Samuel and Purucker, Lennart and\n         Krishnakumar, Arjun and K{\\\"o}rfer, Max and Hoo, Shi Bin and\n         Schirrmeister, Robin Tibor and Hutter, Frank},\n journal={Nature},\n year={2025},\n month={01},\n day={09},\n doi={10.1038/s41586-024-08328-6},\n publisher={Springer Nature},\n url={https://www.nature.com/articles/s41586-024-08328-6},\n}\n\n@inproceedings{hollmann2023tabpfn,\n  title={TabPFN: A transformer that solves small tabular classification problems in a second},\n  author={Hollmann, Noah and M{\\\"u}ller, Samuel and Eggensperger, Katharina and Hutter, Frank},\n  booktitle={International Conference on Learning Representations 2023},\n  year={2023}\n}\n```\n\n## 🤝 License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE.txt](LICENSE.txt) file for details.\n\n## Development\n\nTo encourage better coding practices, `ruff` has been added to the pre-commit hooks. This will ensure that the code is formatted properly before being committed. To enable pre-commit (if you haven't), run the following command:\n\n```bash\npre-commit install\n```\n\nAdditionally, it is recommended that developers install the ruff extension in their preferred editor. For installation instructions, refer to the [Ruff Integrations Documentation](https://docs.astral.sh/ruff/integrations/).\n\n### Build from GitHub\n\n```bash\ngit clone https://github.com/PriorLabs/tabpfn-client\ncd tabpfn-client\ngit submodule update --init --recursive\npip install -e .\ncd ..\n```\n\nNOTE: For development, you will need to download some additional dev dependencies.\nUse the below command to get it ready for development and running tests.\n\n```bash\npip install -e \".[dev]\"\n```\n\n### Build for PyPI\n\n```bash\nif [ -d \"dist\" ]; then rm -rf dist/*; fi\npython3 -m pip install --upgrade build; python3 -m build\npython3 -m twine upload --repository pypi dist/*\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriorlabs%2Ftabpfn-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpriorlabs%2Ftabpfn-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpriorlabs%2Ftabpfn-client/lists"}