Name | tora JSON |
Version |
0.0.11
JSON |
| download |
home_page | None |
Summary | Python SDK for Tora ML experiment tracking platform |
upload_time | 2025-09-01 08:31:32 |
maintainer | None |
docs_url | None |
author | Tora Team |
requires_python | >=3.11 |
license | MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
data-science
experiment-tracking
machine-learning
mlops
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Tora Python SDK — Developer Guide
Private repository for the Tora Python SDK. This document describes how to set up the development environment, run tests, and contribute changes.
## Prerequisites
- Python 3.11–3.13
- A virtual environment tool (venv/pyenv)
- Optional: `pre-commit` installed locally
## Setup
```bash
# Create and activate a virtualenv
python -m venv .venv
source .venv/bin/activate
# Install dev dependencies
pip install -e ".[dev]"
# (Optional) enable pre-commit hooks
pre-commit install
```
## Fast Iteration
- Run full test suite: `pytest -q`
- Run a single file: `pytest tests/test_wrapper.py -q`
- Lint and autofix: `ruff check . --fix`
- Clean artifacts: `make clean`
Coverage reports are written to `htmlcov/` and `coverage.xml`.
## Project Structure
- `tora/_client.py`: Core client (experiment create/load, logging, buffering)
- `tora/_wrapper.py`: Global convenience API (e.g., `setup`, `tmetric`, `tresult`)
- `tora/_http.py`: Minimal HTTP client and exceptions
- `tora/_validation.py`: Input validators
- `tora/_types.py`: Typed aliases and small data types
- `tora/__init__.py`: Public exports and `__version__`
- `tests/`: Unit tests (HTTP calls are mocked; no network required)
## Development Notes
- Public metric API:
- Use `Tora.metric(name, value, step=None)` for training metrics.
- Use `Tora.result(name, value)` for final results (metadata handled internally).
- The global wrapper exposes `tmetric(...)` and `tresult(...)`. `tlog` is internal only.
- Input validation must go through validators in `tora/_validation.py`.
- Keep changes small and focused; update or add tests alongside code.
- Avoid adding new dependencies unless necessary.
## Versioning and Changelog
- Bump version in `tora/__init__.py` (`__version__`).
- Document changes in `CHANGELOG.md` using Keep a Changelog format.
Release checklist (internal):
- Update README and examples as needed.
- Ensure `pytest -q` passes locally.
- Ensure `ruff check .` is clean (or run with `--fix`).
- Build wheel: `python -m build --wheel`
- Optionally validate: `twine check dist/*`
- Publish (internal/private): `twine upload dist/*` or use `make pub-wheel`.
## Environment Variables (for manual runs)
- `TORA_API_KEY`: API key if talking to a live backend.
- `TORA_BASE_URL`: API base URL (defaults to the configured value in `_config.py`).
Tests mock the HTTP layer; neither variable is required to run tests.
## Examples
Lightweight sanity check snippet (no network; just validates shape):
```python
from tora import Tora
t = Tora("exp-local", url="https://example/exp-local")
t.metric("accuracy", 0.95, step=1)
t.result("best_accuracy", 0.95)
t.flush()
t.shutdown()
```
For a real run against an API instance, prefer using the wrapper:
```python
from tora import setup, tmetric, tresult, shutdown
setup("dev-experiment", api_key="...", workspace_id="...")
tmetric("loss", 0.5, step=1)
tresult("best_acc", 0.95)
shutdown()
```
## Makefile
- `make help` — list available targets
- `make build-wheel` — build wheel in `dist/`
- `make publish-test` — upload to TestPyPI
- `make publish` — upload to PyPI
- `make pub-wheel` — build, check, publish, clean
This is a private repo; use publish targets only for internal registries.
Raw data
{
"_id": null,
"home_page": null,
"name": "tora",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "data-science, experiment-tracking, machine-learning, mlops",
"author": "Tora Team",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# Tora Python SDK \u2014 Developer Guide\n\nPrivate repository for the Tora Python SDK. This document describes how to set up the development environment, run tests, and contribute changes.\n\n## Prerequisites\n\n- Python 3.11\u20133.13\n- A virtual environment tool (venv/pyenv)\n- Optional: `pre-commit` installed locally\n\n## Setup\n\n```bash\n# Create and activate a virtualenv\npython -m venv .venv\nsource .venv/bin/activate\n\n# Install dev dependencies\npip install -e \".[dev]\"\n\n# (Optional) enable pre-commit hooks\npre-commit install\n```\n\n## Fast Iteration\n\n- Run full test suite: `pytest -q`\n- Run a single file: `pytest tests/test_wrapper.py -q`\n- Lint and autofix: `ruff check . --fix`\n- Clean artifacts: `make clean`\n\nCoverage reports are written to `htmlcov/` and `coverage.xml`.\n\n## Project Structure\n\n- `tora/_client.py`: Core client (experiment create/load, logging, buffering)\n- `tora/_wrapper.py`: Global convenience API (e.g., `setup`, `tmetric`, `tresult`)\n- `tora/_http.py`: Minimal HTTP client and exceptions\n- `tora/_validation.py`: Input validators\n- `tora/_types.py`: Typed aliases and small data types\n- `tora/__init__.py`: Public exports and `__version__`\n- `tests/`: Unit tests (HTTP calls are mocked; no network required)\n\n## Development Notes\n\n- Public metric API:\n - Use `Tora.metric(name, value, step=None)` for training metrics.\n - Use `Tora.result(name, value)` for final results (metadata handled internally).\n - The global wrapper exposes `tmetric(...)` and `tresult(...)`. `tlog` is internal only.\n- Input validation must go through validators in `tora/_validation.py`.\n- Keep changes small and focused; update or add tests alongside code.\n- Avoid adding new dependencies unless necessary.\n\n## Versioning and Changelog\n\n- Bump version in `tora/__init__.py` (`__version__`).\n- Document changes in `CHANGELOG.md` using Keep a Changelog format.\n\nRelease checklist (internal):\n- Update README and examples as needed.\n- Ensure `pytest -q` passes locally.\n- Ensure `ruff check .` is clean (or run with `--fix`).\n- Build wheel: `python -m build --wheel`\n- Optionally validate: `twine check dist/*`\n- Publish (internal/private): `twine upload dist/*` or use `make pub-wheel`.\n\n## Environment Variables (for manual runs)\n\n- `TORA_API_KEY`: API key if talking to a live backend.\n- `TORA_BASE_URL`: API base URL (defaults to the configured value in `_config.py`).\n\nTests mock the HTTP layer; neither variable is required to run tests.\n\n## Examples\n\nLightweight sanity check snippet (no network; just validates shape):\n\n```python\nfrom tora import Tora\n\nt = Tora(\"exp-local\", url=\"https://example/exp-local\")\nt.metric(\"accuracy\", 0.95, step=1)\nt.result(\"best_accuracy\", 0.95)\nt.flush()\nt.shutdown()\n```\n\nFor a real run against an API instance, prefer using the wrapper:\n\n```python\nfrom tora import setup, tmetric, tresult, shutdown\n\nsetup(\"dev-experiment\", api_key=\"...\", workspace_id=\"...\")\ntmetric(\"loss\", 0.5, step=1)\ntresult(\"best_acc\", 0.95)\nshutdown()\n```\n\n## Makefile\n\n- `make help` \u2014 list available targets\n- `make build-wheel` \u2014 build wheel in `dist/`\n- `make publish-test` \u2014 upload to TestPyPI\n- `make publish` \u2014 upload to PyPI\n- `make pub-wheel` \u2014 build, check, publish, clean\n\nThis is a private repo; use publish targets only for internal registries.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) [year] [fullname]\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Python SDK for Tora ML experiment tracking platform",
"version": "0.0.11",
"project_urls": {
"Homepage": "https://pypi.org/project/tora/",
"Issues": "https://github.com/taigaishida/tora/issues",
"Repository": "https://github.com/taigaishida/tora"
},
"split_keywords": [
"data-science",
" experiment-tracking",
" machine-learning",
" mlops"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1fa5a862a8a6509d1f79db8b32f186968fe01b1c7c8033ff133a0f4910e6018c",
"md5": "51a48dbd189eeac3a83a5e7e71d4e349",
"sha256": "5a398dfa57f50dd6b3e5d6ff4701e13cd65a397bb50a857aeb385a927e99a540"
},
"downloads": -1,
"filename": "tora-0.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51a48dbd189eeac3a83a5e7e71d4e349",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 16999,
"upload_time": "2025-09-01T08:31:32",
"upload_time_iso_8601": "2025-09-01T08:31:32.765486Z",
"url": "https://files.pythonhosted.org/packages/1f/a5/a862a8a6509d1f79db8b32f186968fe01b1c7c8033ff133a0f4910e6018c/tora-0.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-01 08:31:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "taigaishida",
"github_project": "tora",
"github_not_found": true,
"lcname": "tora"
}