yanex 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yanex-0.1.0/CHANGELOG.md +52 -0
- yanex-0.1.0/CONTRIBUTING.md +253 -0
- yanex-0.1.0/LICENSE +21 -0
- yanex-0.1.0/MANIFEST.in +37 -0
- yanex-0.1.0/Makefile +40 -0
- yanex-0.1.0/PKG-INFO +251 -0
- yanex-0.1.0/README.md +206 -0
- yanex-0.1.0/docs/README.md +67 -0
- yanex-0.1.0/docs/best-practices.md +247 -0
- yanex-0.1.0/docs/cli-commands.md +314 -0
- yanex-0.1.0/docs/commands/compare.md +363 -0
- yanex-0.1.0/docs/commands/list.md +193 -0
- yanex-0.1.0/docs/commands/run.md +308 -0
- yanex-0.1.0/docs/configuration.md +409 -0
- yanex-0.1.0/docs/python-api.md +584 -0
- yanex-0.1.0/examples/api/api_usage.py +117 -0
- yanex-0.1.0/examples/api/manual_control.py +154 -0
- yanex-0.1.0/examples/api/matplotlib_example.py +212 -0
- yanex-0.1.0/examples/cli/advanced_benchmark.py +132 -0
- yanex-0.1.0/examples/cli/basic_benchmark.py +61 -0
- yanex-0.1.0/examples/cli/config.yaml +16 -0
- yanex-0.1.0/pyproject.toml +110 -0
- yanex-0.1.0/requirements-dev.txt +14 -0
- yanex-0.1.0/requirements.txt +7 -0
- yanex-0.1.0/setup.cfg +4 -0
- yanex-0.1.0/setup.py +51 -0
- yanex-0.1.0/yanex/__init__.py +74 -0
- yanex-0.1.0/yanex/api.py +507 -0
- yanex-0.1.0/yanex/cli/__init__.py +3 -0
- yanex-0.1.0/yanex/cli/_utils.py +114 -0
- yanex-0.1.0/yanex/cli/commands/__init__.py +3 -0
- yanex-0.1.0/yanex/cli/commands/archive.py +177 -0
- yanex-0.1.0/yanex/cli/commands/compare.py +320 -0
- yanex-0.1.0/yanex/cli/commands/confirm.py +198 -0
- yanex-0.1.0/yanex/cli/commands/delete.py +203 -0
- yanex-0.1.0/yanex/cli/commands/list.py +243 -0
- yanex-0.1.0/yanex/cli/commands/run.py +625 -0
- yanex-0.1.0/yanex/cli/commands/show.py +560 -0
- yanex-0.1.0/yanex/cli/commands/unarchive.py +177 -0
- yanex-0.1.0/yanex/cli/commands/update.py +282 -0
- yanex-0.1.0/yanex/cli/filters/__init__.py +8 -0
- yanex-0.1.0/yanex/cli/filters/base.py +286 -0
- yanex-0.1.0/yanex/cli/filters/time_utils.py +178 -0
- yanex-0.1.0/yanex/cli/formatters/__init__.py +7 -0
- yanex-0.1.0/yanex/cli/formatters/console.py +325 -0
- yanex-0.1.0/yanex/cli/main.py +45 -0
- yanex-0.1.0/yanex/core/__init__.py +3 -0
- yanex-0.1.0/yanex/core/comparison.py +549 -0
- yanex-0.1.0/yanex/core/config.py +587 -0
- yanex-0.1.0/yanex/core/constants.py +16 -0
- yanex-0.1.0/yanex/core/environment.py +146 -0
- yanex-0.1.0/yanex/core/git_utils.py +153 -0
- yanex-0.1.0/yanex/core/manager.py +555 -0
- yanex-0.1.0/yanex/core/storage.py +682 -0
- yanex-0.1.0/yanex/ui/__init__.py +1 -0
- yanex-0.1.0/yanex/ui/compare_table.py +524 -0
- yanex-0.1.0/yanex/utils/__init__.py +3 -0
- yanex-0.1.0/yanex/utils/exceptions.py +70 -0
- yanex-0.1.0/yanex/utils/validation.py +165 -0
- yanex-0.1.0/yanex.egg-info/SOURCES.txt +57 -0
yanex-0.1.0/CHANGELOG.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Comprehensive parameter sweep functionality with range(), linspace(), logspace(), and list() syntax
|
12
|
+
- Parameter-aware experiment naming for sweep experiments
|
13
|
+
- Cross-product parameter expansion for multiple sweep parameters
|
14
|
+
- Staging mechanism for deferred experiment execution
|
15
|
+
- Interactive experiment comparison with rich console output
|
16
|
+
- Git integration for reproducible experiment tracking
|
17
|
+
- Comprehensive CLI with run, list, show, compare, archive commands
|
18
|
+
- Python API for programmatic experiment management
|
19
|
+
- Configuration file support (YAML/JSON) with parameter overrides
|
20
|
+
- Artifact and result logging capabilities
|
21
|
+
- Time-based and tag-based experiment filtering
|
22
|
+
- Thread-local experiment state management
|
23
|
+
|
24
|
+
### Changed
|
25
|
+
- Modernized package configuration with pyproject.toml
|
26
|
+
- Enhanced README with parameter sweep examples
|
27
|
+
- Improved error handling and validation throughout
|
28
|
+
|
29
|
+
### Fixed
|
30
|
+
- Parameter parsing precedence for numeric values
|
31
|
+
- Experiment name validation for generated sweep names
|
32
|
+
- Scientific notation formatting in experiment names
|
33
|
+
- Boolean comparison patterns in codebase
|
34
|
+
|
35
|
+
## [0.1.0] - 2024-XX-XX
|
36
|
+
|
37
|
+
### Added
|
38
|
+
- Initial release of Yanex experiment tracking system
|
39
|
+
- Core experiment lifecycle management
|
40
|
+
- File-based storage backend
|
41
|
+
- Command-line interface for experiment management
|
42
|
+
- Python API for experiment creation and tracking
|
43
|
+
- Git integration for code state tracking
|
44
|
+
- Configuration management with parameter overrides
|
45
|
+
- Experiment comparison and visualization tools
|
46
|
+
- Comprehensive test suite with >90% coverage
|
47
|
+
- Documentation and examples
|
48
|
+
|
49
|
+
### Security
|
50
|
+
- Input validation for all user-provided data
|
51
|
+
- Safe file operations with proper error handling
|
52
|
+
- Git state verification for experiment reproducibility
|
@@ -0,0 +1,253 @@
|
|
1
|
+
# Contributing to Yanex
|
2
|
+
|
3
|
+
Thank you for your interest in contributing to Yanex! We welcome contributions from the community and are excited to work with you.
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
### Development Setup
|
8
|
+
|
9
|
+
1. **Fork and clone the repository**
|
10
|
+
```bash
|
11
|
+
git clone https://github.com/rueckstiess/yanex.git
|
12
|
+
cd yanex
|
13
|
+
```
|
14
|
+
|
15
|
+
2. **Set up development environment**
|
16
|
+
```bash
|
17
|
+
# Create virtual environment
|
18
|
+
python -m venv venv
|
19
|
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
20
|
+
|
21
|
+
# Install development dependencies
|
22
|
+
pip install -e ".[dev]"
|
23
|
+
# Or using requirements files
|
24
|
+
pip install -r requirements.txt -r requirements-dev.txt
|
25
|
+
```
|
26
|
+
|
27
|
+
3. **Verify installation**
|
28
|
+
```bash
|
29
|
+
# Run tests
|
30
|
+
pytest
|
31
|
+
|
32
|
+
# Check code style
|
33
|
+
ruff check .
|
34
|
+
ruff format --check .
|
35
|
+
|
36
|
+
# Type checking
|
37
|
+
mypy yanex/
|
38
|
+
```
|
39
|
+
|
40
|
+
## Development Workflow
|
41
|
+
|
42
|
+
### Code Style
|
43
|
+
|
44
|
+
We use modern Python tooling for consistent code style:
|
45
|
+
|
46
|
+
- **Formatting**: `ruff format` (replaces black)
|
47
|
+
- **Linting**: `ruff check` (replaces flake8, isort, and more)
|
48
|
+
- **Type checking**: `mypy`
|
49
|
+
|
50
|
+
Before submitting changes:
|
51
|
+
```bash
|
52
|
+
# Format code
|
53
|
+
ruff format .
|
54
|
+
|
55
|
+
# Fix linting issues
|
56
|
+
ruff check --fix .
|
57
|
+
|
58
|
+
# Run type checking
|
59
|
+
mypy yanex/
|
60
|
+
```
|
61
|
+
|
62
|
+
### Testing
|
63
|
+
|
64
|
+
All tests must pass before merging:
|
65
|
+
|
66
|
+
```bash
|
67
|
+
# Run all tests with coverage
|
68
|
+
pytest
|
69
|
+
|
70
|
+
# Run specific test files
|
71
|
+
pytest tests/core/test_manager.py
|
72
|
+
pytest tests/cli/test_run.py
|
73
|
+
|
74
|
+
# Run tests matching a pattern
|
75
|
+
pytest -k "test_sweep"
|
76
|
+
```
|
77
|
+
|
78
|
+
**Test Guidelines:**
|
79
|
+
- Write tests for all new functionality
|
80
|
+
- Include both positive and negative test cases
|
81
|
+
- Test edge cases and error conditions
|
82
|
+
- Use descriptive test names that explain what's being tested
|
83
|
+
|
84
|
+
### Commit Messages
|
85
|
+
|
86
|
+
We follow conventional commit format:
|
87
|
+
|
88
|
+
```
|
89
|
+
type(scope): description
|
90
|
+
|
91
|
+
[optional body]
|
92
|
+
|
93
|
+
[optional footer]
|
94
|
+
```
|
95
|
+
|
96
|
+
**Types:**
|
97
|
+
- `feat`: New features
|
98
|
+
- `fix`: Bug fixes
|
99
|
+
- `docs`: Documentation changes
|
100
|
+
- `test`: Adding or updating tests
|
101
|
+
- `refactor`: Code refactoring
|
102
|
+
- `perf`: Performance improvements
|
103
|
+
- `ci`: CI/CD changes
|
104
|
+
|
105
|
+
**Examples:**
|
106
|
+
```
|
107
|
+
feat(sweeps): add parameter sweep functionality
|
108
|
+
fix(cli): handle empty experiment list gracefully
|
109
|
+
docs(readme): add parameter sweep examples
|
110
|
+
test(core): add tests for experiment manager
|
111
|
+
```
|
112
|
+
|
113
|
+
## Types of Contributions
|
114
|
+
|
115
|
+
### 🐛 Bug Reports
|
116
|
+
|
117
|
+
When reporting bugs, please include:
|
118
|
+
|
119
|
+
1. **Clear description** of the issue
|
120
|
+
2. **Steps to reproduce** the problem
|
121
|
+
3. **Expected vs actual behavior**
|
122
|
+
4. **Environment information**:
|
123
|
+
- Python version
|
124
|
+
- Yanex version
|
125
|
+
- Operating system
|
126
|
+
5. **Minimal code example** if applicable
|
127
|
+
|
128
|
+
### 💡 Feature Requests
|
129
|
+
|
130
|
+
For new features:
|
131
|
+
|
132
|
+
1. **Check existing issues** to avoid duplicates
|
133
|
+
2. **Describe the use case** - why is this needed?
|
134
|
+
3. **Propose a solution** - how should it work?
|
135
|
+
4. **Consider alternatives** - are there other approaches?
|
136
|
+
|
137
|
+
### 🔧 Code Contributions
|
138
|
+
|
139
|
+
1. **Start with an issue** - discuss before implementing
|
140
|
+
2. **Fork and create a branch** from `main`
|
141
|
+
3. **Make your changes** following our guidelines
|
142
|
+
4. **Add tests** for new functionality
|
143
|
+
5. **Update documentation** if needed
|
144
|
+
6. **Submit a pull request**
|
145
|
+
|
146
|
+
### 📚 Documentation
|
147
|
+
|
148
|
+
Documentation improvements are always welcome:
|
149
|
+
|
150
|
+
- Fix typos or unclear explanations
|
151
|
+
- Add examples and use cases
|
152
|
+
- Improve API documentation
|
153
|
+
- Write tutorials or guides
|
154
|
+
|
155
|
+
## Pull Request Process
|
156
|
+
|
157
|
+
1. **Create a feature branch**
|
158
|
+
```bash
|
159
|
+
git checkout -b feature/your-feature-name
|
160
|
+
```
|
161
|
+
|
162
|
+
2. **Make your changes**
|
163
|
+
- Follow code style guidelines
|
164
|
+
- Add tests for new functionality
|
165
|
+
- Update documentation as needed
|
166
|
+
|
167
|
+
3. **Test your changes**
|
168
|
+
```bash
|
169
|
+
pytest
|
170
|
+
ruff check .
|
171
|
+
mypy yanex/
|
172
|
+
```
|
173
|
+
|
174
|
+
4. **Commit your changes**
|
175
|
+
```bash
|
176
|
+
git add .
|
177
|
+
git commit -m "feat(scope): your descriptive message"
|
178
|
+
```
|
179
|
+
|
180
|
+
5. **Push and create PR**
|
181
|
+
```bash
|
182
|
+
git push origin feature/your-feature-name
|
183
|
+
```
|
184
|
+
|
185
|
+
6. **Fill out PR template** with:
|
186
|
+
- Description of changes
|
187
|
+
- Related issues
|
188
|
+
- Testing performed
|
189
|
+
- Breaking changes (if any)
|
190
|
+
|
191
|
+
### PR Review Process
|
192
|
+
|
193
|
+
- All PRs require review before merging
|
194
|
+
- CI tests must pass
|
195
|
+
- Code coverage should not decrease
|
196
|
+
- Documentation must be updated for public APIs
|
197
|
+
|
198
|
+
|
199
|
+
## Architecture Overview
|
200
|
+
|
201
|
+
Understanding the codebase structure:
|
202
|
+
|
203
|
+
```
|
204
|
+
yanex/
|
205
|
+
├── core/ # Core experiment tracking logic
|
206
|
+
│ ├── manager.py # Experiment lifecycle management
|
207
|
+
│ ├── storage.py # File system storage backend
|
208
|
+
│ ├── config.py # Configuration and parameter handling
|
209
|
+
│ └── ...
|
210
|
+
├── cli/ # Command-line interface
|
211
|
+
│ ├── commands/ # Individual CLI commands
|
212
|
+
│ └── main.py # CLI entry point
|
213
|
+
├── api.py # Public Python API
|
214
|
+
└── utils/ # Shared utilities
|
215
|
+
```
|
216
|
+
|
217
|
+
**Key Components:**
|
218
|
+
- **ExperimentManager**: Orchestrates experiment lifecycle
|
219
|
+
- **Storage**: Handles file operations and metadata
|
220
|
+
- **Config**: Parameter parsing and sweep expansion
|
221
|
+
- **CLI**: User-facing command interface
|
222
|
+
|
223
|
+
## Release Process
|
224
|
+
|
225
|
+
We use semantic versioning (MAJOR.MINOR.PATCH):
|
226
|
+
|
227
|
+
- **MAJOR**: Breaking changes
|
228
|
+
- **MINOR**: New features (backward compatible)
|
229
|
+
- **PATCH**: Bug fixes
|
230
|
+
|
231
|
+
Releases are managed by maintainers and follow this process:
|
232
|
+
1. Update version in `pyproject.toml`
|
233
|
+
2. Update `CHANGELOG.md`
|
234
|
+
3. Create release tag
|
235
|
+
4. Publish to PyPI
|
236
|
+
|
237
|
+
## Getting Help
|
238
|
+
|
239
|
+
- **Questions**: Open a GitHub discussion
|
240
|
+
- **Bugs**: Create an issue with the bug template
|
241
|
+
- **Features**: Open an issue with the feature template
|
242
|
+
- **Chat**: [Add Discord/Slack link if available]
|
243
|
+
|
244
|
+
## Code of Conduct
|
245
|
+
|
246
|
+
We are committed to providing a welcoming and inclusive environment. Please:
|
247
|
+
|
248
|
+
- Be respectful and constructive
|
249
|
+
- Welcome newcomers and help them learn
|
250
|
+
- Focus on what's best for the community
|
251
|
+
- Show empathy towards other contributors
|
252
|
+
|
253
|
+
Thank you for contributing to Yanex! 🚀
|
yanex-0.1.0/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2025 Thomas Rueckstiess
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
yanex-0.1.0/MANIFEST.in
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Include documentation files
|
2
|
+
include README.md
|
3
|
+
include LICENSE
|
4
|
+
include CHANGELOG.md
|
5
|
+
include CONTRIBUTING.md
|
6
|
+
include requirements.txt
|
7
|
+
include requirements-dev.txt
|
8
|
+
|
9
|
+
# Include configuration files
|
10
|
+
include pyproject.toml
|
11
|
+
include Makefile
|
12
|
+
|
13
|
+
# Include documentation directory
|
14
|
+
recursive-include docs *.md
|
15
|
+
|
16
|
+
# Include examples
|
17
|
+
recursive-include examples *.py *.yaml *.yml *.json
|
18
|
+
|
19
|
+
# Exclude test files from distribution
|
20
|
+
exclude tests
|
21
|
+
recursive-exclude tests *
|
22
|
+
|
23
|
+
# Exclude development files
|
24
|
+
exclude .gitignore
|
25
|
+
exclude .coverage
|
26
|
+
exclude .pytest_cache
|
27
|
+
recursive-exclude htmlcov *
|
28
|
+
recursive-exclude yanex.egg-info *
|
29
|
+
recursive-exclude planning *
|
30
|
+
|
31
|
+
# Exclude temporary files
|
32
|
+
global-exclude *.pyc
|
33
|
+
global-exclude *.pyo
|
34
|
+
global-exclude *.pyd
|
35
|
+
global-exclude __pycache__
|
36
|
+
global-exclude .DS_Store
|
37
|
+
global-exclude *.so
|
yanex-0.1.0/Makefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
.PHONY: install test lint format clean build
|
2
|
+
|
3
|
+
# Development setup
|
4
|
+
install:
|
5
|
+
pip install -e ".[dev]"
|
6
|
+
|
7
|
+
# Testing
|
8
|
+
test:
|
9
|
+
pytest
|
10
|
+
|
11
|
+
test-cov:
|
12
|
+
pytest --cov=yanex --cov-report=html --cov-report=term-missing
|
13
|
+
|
14
|
+
# Code quality
|
15
|
+
lint:
|
16
|
+
ruff check yanex tests
|
17
|
+
mypy yanex
|
18
|
+
|
19
|
+
format:
|
20
|
+
ruff format yanex tests
|
21
|
+
|
22
|
+
format-check:
|
23
|
+
ruff format --check yanex tests
|
24
|
+
|
25
|
+
# Cleanup
|
26
|
+
clean:
|
27
|
+
rm -rf build/
|
28
|
+
rm -rf dist/
|
29
|
+
rm -rf *.egg-info/
|
30
|
+
rm -rf htmlcov/
|
31
|
+
rm -rf .coverage
|
32
|
+
find . -type d -name __pycache__ -delete
|
33
|
+
find . -type f -name "*.pyc" -delete
|
34
|
+
|
35
|
+
# Build
|
36
|
+
build: clean
|
37
|
+
python -m build
|
38
|
+
|
39
|
+
# All checks
|
40
|
+
check: format-check lint test
|
yanex-0.1.0/PKG-INFO
ADDED
@@ -0,0 +1,251 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: yanex
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Yet Another Experiment Tracker - A lightweight experiment tracking harness
|
5
|
+
Author: Thomas
|
6
|
+
Author-email: Thomas <from+gitgub@tomr.au>
|
7
|
+
License: MIT
|
8
|
+
Project-URL: Homepage, https://github.com/rueckstiess/yanex
|
9
|
+
Project-URL: Repository, https://github.com/rueckstiess/yanex
|
10
|
+
Project-URL: Documentation, https://github.com/rueckstiess/yanex/blob/main/docs/README.md
|
11
|
+
Project-URL: Issues, https://github.com/rueckstiess/yanex/issues
|
12
|
+
Keywords: experiment,tracking,machine-learning,research,reproducibility
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
14
|
+
Classifier: Intended Audience :: Developers
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
17
|
+
Classifier: Operating System :: OS Independent
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
19
|
+
Classifier: Programming Language :: Python :: 3.8
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
24
|
+
Classifier: Topic :: Scientific/Engineering
|
25
|
+
Classifier: Topic :: Software Development :: Libraries
|
26
|
+
Requires-Python: >=3.8
|
27
|
+
Description-Content-Type: text/markdown
|
28
|
+
License-File: LICENSE
|
29
|
+
Requires-Dist: click>=8.0.0
|
30
|
+
Requires-Dist: pyyaml>=6.0
|
31
|
+
Requires-Dist: rich>=12.0.0
|
32
|
+
Requires-Dist: gitpython>=3.1.0
|
33
|
+
Requires-Dist: dateparser>=1.1.0
|
34
|
+
Requires-Dist: textual>=0.45.0
|
35
|
+
Provides-Extra: dev
|
36
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
37
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
38
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
39
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
40
|
+
Provides-Extra: matplotlib
|
41
|
+
Requires-Dist: matplotlib>=3.5.0; extra == "matplotlib"
|
42
|
+
Dynamic: author
|
43
|
+
Dynamic: license-file
|
44
|
+
Dynamic: requires-python
|
45
|
+
|
46
|
+
# Yanex - Yet Another Experiment Tracker
|
47
|
+
|
48
|
+
A lightweight, Git-aware experiment tracking system for Python that makes reproducible research effortless.
|
49
|
+
|
50
|
+
## Why Yanex?
|
51
|
+
|
52
|
+
**Stop losing track of your experiments.** Yanex automatically tracks parameters, results, and code state so you can focus on what matters - your research.
|
53
|
+
|
54
|
+
```python
|
55
|
+
import yanex
|
56
|
+
|
57
|
+
# read parameters from config file or CLI arguments
|
58
|
+
lr = yanex.get_param('lr', default=0.001)
|
59
|
+
epochs = yanex.get_param('epochs', default=10)
|
60
|
+
|
61
|
+
# access nested parameters with dot notation
|
62
|
+
model_lr = yanex.get_param('model.learning_rate', default=0.001)
|
63
|
+
optimizer_type = yanex.get_param('model.optimizer.type', default='adam')
|
64
|
+
|
65
|
+
# your experiment code
|
66
|
+
# ...
|
67
|
+
|
68
|
+
# log results, artifacts and figures
|
69
|
+
yanex.log_results({"step": epoch, "loss", loss, "accuracy": accuracy})
|
70
|
+
yanex.log_artifact("model.pth", model_path)
|
71
|
+
yanex.log_matplotlib_figure(fig, "loss_curve.png")
|
72
|
+
```
|
73
|
+
|
74
|
+
Run from the command line:
|
75
|
+
|
76
|
+
```bash
|
77
|
+
# Run with yanex CLI for automatic tracking
|
78
|
+
yanex run train.py --name "my-experiment" --tag testing --param lr=0.001 --param epochs=10
|
79
|
+
```
|
80
|
+
|
81
|
+
That's it. Yanex tracks the experiment, saves the logged results and files, stdout and stderr outptus, Python environment
|
82
|
+
information, and even the Git state of your code repository. You can then compare results, search experiments, and reproduce them with ease.
|
83
|
+
|
84
|
+
## Key Features
|
85
|
+
|
86
|
+
- 🔒 **Reproducible**: Automatic Git state tracking ensures every experiment is reproducible
|
87
|
+
- 📊 **Interactive Comparison**: Compare experiments side-by-side with an interactive table
|
88
|
+
- ⚙️ **Flexible Parameters**: YAML configs with CLI overrides for easy experimentation and syntax for parameter sweeps
|
89
|
+
- 📈 **Rich Logging**: Track metrics, artifacts, and figures
|
90
|
+
- 🔍 **Powerful Search**: Find experiments by status, parameters, tags, or time ranges
|
91
|
+
- 📦 **Zero Dependencies**: No external services required - works offline
|
92
|
+
|
93
|
+
## Quick Start
|
94
|
+
|
95
|
+
### Install
|
96
|
+
```bash
|
97
|
+
pip install yanex
|
98
|
+
```
|
99
|
+
|
100
|
+
### 1. Run Your First Experiment
|
101
|
+
|
102
|
+
```python
|
103
|
+
# experiment.py
|
104
|
+
import yanex
|
105
|
+
|
106
|
+
params = yanex.get_params()
|
107
|
+
print(f"Learning rate: {params.get('learning_rate', 0.001)}")
|
108
|
+
|
109
|
+
# Simulate training
|
110
|
+
accuracy = 0.85 + (params.get('learning_rate', 0.001) * 10)
|
111
|
+
|
112
|
+
yanex.log_results({
|
113
|
+
"accuracy": accuracy,
|
114
|
+
"loss": 1 - accuracy
|
115
|
+
})
|
116
|
+
```
|
117
|
+
|
118
|
+
```bash
|
119
|
+
# Run with default parameters
|
120
|
+
yanex run experiment.py
|
121
|
+
|
122
|
+
# Override parameters
|
123
|
+
yanex run experiment.py --param learning_rate=0.01 --param epochs=50
|
124
|
+
|
125
|
+
# Add tags for organization
|
126
|
+
yanex run experiment.py --tag baseline --tag "quick-test"
|
127
|
+
```
|
128
|
+
|
129
|
+
### 2. Compare Results
|
130
|
+
|
131
|
+
```bash
|
132
|
+
# Interactive comparison table
|
133
|
+
yanex compare
|
134
|
+
|
135
|
+
# Compare specific experiments
|
136
|
+
yanex compare exp1 exp2 exp3
|
137
|
+
|
138
|
+
# Filter and compare
|
139
|
+
yanex compare --status completed --tag baseline
|
140
|
+
```
|
141
|
+
|
142
|
+
### 3. Track Everything
|
143
|
+
|
144
|
+
List, search, and manage your experiments:
|
145
|
+
|
146
|
+
```bash
|
147
|
+
# List recent experiments
|
148
|
+
yanex list
|
149
|
+
|
150
|
+
# Find experiments by criteria
|
151
|
+
yanex list --status completed --tag production
|
152
|
+
yanex list --started-after "1 week ago"
|
153
|
+
|
154
|
+
# Show detailed experiment info
|
155
|
+
yanex show exp_id
|
156
|
+
|
157
|
+
# Archive old experiments
|
158
|
+
yanex archive --started-before "1 month ago"
|
159
|
+
```
|
160
|
+
|
161
|
+
## Two Ways to Use Yanex
|
162
|
+
|
163
|
+
Yanex supports two usage patterns:
|
164
|
+
|
165
|
+
### 1. CLI-First (Recommended)
|
166
|
+
Write scripts that work both standalone and with yanex tracking:
|
167
|
+
|
168
|
+
```python
|
169
|
+
# train.py - Works both ways!
|
170
|
+
import yanex
|
171
|
+
|
172
|
+
params = yanex.get_params() # Gets parameters or defaults
|
173
|
+
lr = params.get('learning_rate', 0.001)
|
174
|
+
|
175
|
+
# Your training code
|
176
|
+
accuracy = train_model(lr=lr)
|
177
|
+
|
178
|
+
# Logging works in both contexts
|
179
|
+
yanex.log_results({"accuracy": accuracy})
|
180
|
+
```
|
181
|
+
|
182
|
+
```bash
|
183
|
+
# Run standalone (no tracking)
|
184
|
+
python train.py
|
185
|
+
|
186
|
+
# Run with yanex (full tracking)
|
187
|
+
yanex run train.py --param learning_rate=0.01
|
188
|
+
```
|
189
|
+
|
190
|
+
### 2. Explicit Experiment Creation (Advanced)
|
191
|
+
For Jupyter notebook usage, or when you need fine control:
|
192
|
+
|
193
|
+
```python
|
194
|
+
import yanex
|
195
|
+
from pathlib import Path
|
196
|
+
|
197
|
+
with yanex.create_experiment(
|
198
|
+
script_path=Path(__file__),
|
199
|
+
name="my-experiment",
|
200
|
+
config={"learning_rate": 0.01}
|
201
|
+
) as exp:
|
202
|
+
# Your code here
|
203
|
+
exp.log_results({"accuracy": 0.95})
|
204
|
+
```
|
205
|
+
|
206
|
+
> **Note:** Don't mix both patterns! Use CLI-first for most cases, explicit creation for advanced scenarios.
|
207
|
+
|
208
|
+
|
209
|
+
## Configuration Files
|
210
|
+
|
211
|
+
Create `config.yaml` for default parameters:
|
212
|
+
|
213
|
+
```yaml
|
214
|
+
# config.yaml
|
215
|
+
model:
|
216
|
+
learning_rate: 0.001
|
217
|
+
batch_size: 32
|
218
|
+
epochs: 100
|
219
|
+
|
220
|
+
data:
|
221
|
+
dataset: "cifar10"
|
222
|
+
augmentation: true
|
223
|
+
|
224
|
+
training:
|
225
|
+
optimizer: "adam"
|
226
|
+
scheduler: "cosine"
|
227
|
+
```
|
228
|
+
|
229
|
+
|
230
|
+
## Documentation
|
231
|
+
|
232
|
+
📚 **[Complete Documentation](docs/README.md)** - Detailed guides and API reference
|
233
|
+
|
234
|
+
**Quick Links:**
|
235
|
+
- [CLI Commands](docs/cli-commands.md) - All yanex commands with examples
|
236
|
+
- [Python API](docs/python-api.md) - Complete Python API reference
|
237
|
+
- [Configuration](docs/configuration.md) - Parameter management and config files
|
238
|
+
- [Comparison Tool](docs/compare.md) - Interactive experiment comparison
|
239
|
+
- [Best Practices](docs/best-practices.md) - Tips for effective experiment tracking
|
240
|
+
|
241
|
+
|
242
|
+
## Contributing
|
243
|
+
|
244
|
+
Yanex is open source and welcomes contributions! See our [contributing guidelines](CONTRIBUTING.md) for details.
|
245
|
+
|
246
|
+
**Built with assistance from [Claude](https://claude.ai).**
|
247
|
+
|
248
|
+
## License
|
249
|
+
|
250
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
251
|
+
|