You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: bump version to 0.6.0 in pyproject.toml and Cargo.toml files (#22)
* feat: add config file support to CLI for hyperparameter loading
- Introduced `--config` argument to load configuration files (JSON/TOML/YAML) in the CLI.
- Enhanced `_describe_parameters` to handle loaded configurations and prioritize them over defined parameters.
- Implemented recursive merging of configurations and added interpolation support.
- Added tests for CLI configuration loading and precedence of overrides.
- Refactored loader functions to support multiple file loading and validation against schemas.
* feat: enhance README and add benchmark scripts for performance evaluation
- Updated README to include detailed performance comparisons between Hyperparameter and Hydra, highlighting speed advantages.
- Added new benchmark scripts to evaluate parameter access performance across different methods.
- Introduced a new `run_benchmark.py` script to automate benchmark execution and output results.
- Included additional benchmark configurations and tests for various access patterns.
- Updated .gitignore to exclude benchmark output files.
* feat: add guides and cookbook documentation for Hyperparameter
- Introduced new navigation section in mkdocs.yml for Guides and Cookbook.
- Added comprehensive architecture overview in architecture.md and architecture.zh.md.
- Created a Cookbook with common recipes for configuration management in cookbook.md and cookbook.zh.md.
- Included a migration guide from Hydra to Hyperparameter in migration_from_hydra.md and migration_from_hydra.zh.md.
- Enhanced documentation accessibility with both English and Chinese versions for key documents.
* feat: add hyperparameter logo to README and Chinese README
- Introduced a new SVG logo for Hyperparameter in the project.
- Updated both English and Chinese README files to include the new logo, enhancing visual appeal and branding.
* refactor: update parameter management syntax and enhance documentation
- Replaced `param_scope` with `scope` and `auto_param` with `param` across all documentation and examples for consistency.
- Updated README, API reference, and various example files to reflect the new syntax.
- Enhanced the clarity of the quick start guide and migration documentation to facilitate user transition to the new syntax.
- Ensured all tests are aligned with the updated parameter management methods.
* chore: update README files with new logo and enhanced formatting
- Added a centered logo to both English and Chinese README files for improved branding.
- Changed the header from an H3 to an H1 for better visibility and consistency.
- Reformatted the description to be centered and bold, enhancing the overall presentation of the project.
* refactor: update hyperparameter management syntax across benchmark and example files
- Replaced `param_scope` with `hp.scope` and `auto_param` with `hp.param` in benchmark scripts and examples for consistency.
- Updated CLI examples to utilize `hp.launch()` instead of `run_cli()`.
- Enhanced documentation to reflect the new syntax and improve clarity in usage.
* chore: bump version to 0.6.0 in pyproject.toml and Cargo.toml files
- Updated version number from 0.5.14 to 0.6.0 across all relevant Cargo.toml files for core, macros, and Python packages.
- Ensured consistency in versioning across the project.
**Hyperparameter, Make configurable AI applications. Build for Python/Rust hackers.**
12
-
11
+
<palign="center">
12
+
<strong>Make configurable AI applications. Build for Python/Rust hackers.</strong>
13
13
</p>
14
14
15
15
Hyperparameter is a versatile library designed to streamline the management and control of hyperparameters in machine learning algorithms and system development. Tailored for AI researchers and Machine Learning Systems (MLSYS) developers, Hyperparameter offers a unified solution with a focus on ease of use in Python, high-performance access in Rust and C++, and a set of macros for seamless hyperparameter management.
@@ -22,33 +22,64 @@ pip install hyperparameter
22
22
# Run a ready-to-use demo
23
23
python -m hyperparameter.examples.quickstart
24
24
25
-
# Try the @auto_param CLI: override defaults from the command line
25
+
# Try the @hp.param CLI: override defaults from the command line
# Running from source? Use module mode or install editable
33
+
# python -m hyperparameter.examples.quickstart
34
+
# or: pip install -e .
35
+
```
36
+
37
+
## Why Hyperparameter?
38
+
39
+
### 🚀 Unmatched Performance (vs Hydra)
40
+
41
+
Hyperparameter is built on a high-performance Rust backend, making it significantly faster than pure Python alternatives like Hydra, especially in inner-loop parameter access.
> Benchmark scenario: Accessing a nested parameter `model.layers.0.size` 1,000,000 timesin a loop.
50
+
> See `benchmark/` folder for reproduction scripts.
51
+
52
+
### ✨ Zero-Dependency Schema Validation
53
+
54
+
Hyperparameter supports structural validation using standard Python type hints without introducing heavy dependencies (like Pydantic or OmegaConf).
55
+
56
+
```python
57
+
from dataclasses import dataclass
58
+
import hyperparameter as hp
59
+
60
+
@dataclass
61
+
class AppConfig:
62
+
host: str
63
+
port: int
64
+
debug: bool = False
65
+
66
+
# Validates types and converts automatically: "8080" -> 8080 (int)
67
+
cfg = hp.config("config.toml", schema=AppConfig)
68
+
```
69
+
70
+
## Key Features
42
71
43
72
### For Python Users
44
73
45
74
- **Pythonic Syntax:** Define hyperparameters using keyword argument syntax;
46
75
47
-
-**Intuitive Scoping:** Control parameter scope through `with` statement;
48
-
49
-
-**Configuration File:** Easy to load parameters from config files;
50
-
51
-
### For Rust and C++ Users
76
+
- **Intuitive Scoping:** Control parameter scope through `with` statement;
77
+
78
+
- **Configuration File:** Easy to load parameters from config files (JSON/TOML/YAML) with composition and interpolation support;
79
+
80
+
- **Zero-Overhead Validation:** Optional schema validation using standard Python type hints;
81
+
82
+
### For Rust and C++ Users
52
83
53
84
- **High-Performance Backend:** Hyperparameter is implemented in Rust, providing a robust and high-performance backend forhyperparameter management. Access hyperparametersin Rust and C++ with minimal overhead, making it ideal for ML and system developers who prioritize performance.
54
85
@@ -67,15 +98,15 @@ pip install hyperparameter
67
98
### Python
68
99
69
100
```python
70
-
from hyperparameter import auto_param, param_scope
0 commit comments