mirror of
https://github.com/thinking-machines-lab/tinker.git
synced 2026-04-19 12:58:01 +00:00
Merge 0dae751545 into 30517b667f
This commit is contained in:
commit
fe98e5616b
2 changed files with 122 additions and 0 deletions
62
CONTRIBUTING.md
Normal file
62
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
# Contributing to Tinker
|
||||
|
||||
Good day! Thank you for your interest in contributing to Tinker.
|
||||
|
||||
We welcome contributions! Please follow these guidelines to help us maintain the project quality.
|
||||
|
||||
## Development Setup
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/thinking-machines-lab/tinker.git
|
||||
cd tinker
|
||||
|
||||
# Install dependencies
|
||||
uv sync
|
||||
|
||||
# Activate virtual environment
|
||||
source .venv/bin/activate
|
||||
|
||||
# Run tests
|
||||
pytest
|
||||
```
|
||||
|
||||
## Code Style
|
||||
|
||||
- We use [ruff](https://docs.astral.sh/ruff/) for linting and formatting
|
||||
- Run `ruff check .` to lint
|
||||
- Run `ruff format .` to format
|
||||
- Type hints are required via mypy
|
||||
|
||||
## Submitting Changes
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch (`git checkout -b feature/your-feature`)
|
||||
3. Make your changes and add tests
|
||||
4. Run the test suite
|
||||
5. Commit with clear messages
|
||||
6. Push to your fork
|
||||
7. Open a Pull Request
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
- PRs should pass all tests
|
||||
- Include a clear description of changes
|
||||
- Link any related issues
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
pytest
|
||||
|
||||
# Run specific test file
|
||||
pytest tests/test_models.py
|
||||
|
||||
# Run with coverage
|
||||
pytest --cov=tinker
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree that your contributions will be licensed under the Apache-2.0 license.
|
||||
60
README.md
60
README.md
|
|
@ -5,3 +5,63 @@
|
|||
Documentation:
|
||||
<a href="http://tinker-docs.thinkingmachines.ai/">tinker-docs.thinkingmachines.ai</a>
|
||||
</div>
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# PyPI
|
||||
pip install tinker
|
||||
|
||||
# uv (recommended)
|
||||
uv add tinker
|
||||
```
|
||||
|
||||
## Quickstart
|
||||
|
||||
### CLI
|
||||
|
||||
```bash
|
||||
# Train a model
|
||||
tinker train --name my-model --training-file training_data.jsonl
|
||||
|
||||
# List your models
|
||||
tinker models list
|
||||
|
||||
# Get model details
|
||||
tinker models get <model_id>
|
||||
```
|
||||
|
||||
### Python SDK
|
||||
|
||||
```python
|
||||
from tinker import Tinker
|
||||
|
||||
# Initialize client
|
||||
client = Tinker(api_key="your-api-key")
|
||||
|
||||
# Create a training run
|
||||
run = client.training.create(
|
||||
name="my-model",
|
||||
training_file="training_data.jsonl",
|
||||
)
|
||||
print(f"Training started: {run.id}")
|
||||
```
|
||||
|
||||
### Using the API
|
||||
|
||||
```bash
|
||||
# Set API key
|
||||
export TINKER_API_KEY="your-api-key"
|
||||
|
||||
# Or use with Python
|
||||
from tinker import Tinker
|
||||
client = Tinker() # Automatically reads TINKER_API_KEY
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation available at [tinker-docs.thinkingmachines.ai](http://tinker-docs.thinkingmachines.ai/)
|
||||
|
||||
## License
|
||||
|
||||
[Apache-2.0](LICENSE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue