Commit da1e025
* Enhance model factory with comprehensive improvements (Issue #151)
## Summary
- Add comprehensive model factory infrastructure with validation, presets, and multi-format support
- Fix datetime deprecation warning affecting all model creation
- Add extensive testing and documentation improvements
## Features Added
- JSON configuration file support alongside YAML
- Auto-format detection for configuration files (.yaml/.yml/.json)
- 5 predefined model presets for common configurations
- Parameter validation with helpful error messages
- Model introspection and utility functions
## API Enhancements
- `create_selection_model_from_json()` - JSON file support
- `create_selection_model_from_file()` - Auto-detect file format
- `create_model_from_preset()` - Create from predefined configurations
- `list_available_models()` - List all available model classes
- `get_model_info()` - Model parameter introspection
- `describe_model()` - Model architecture summary
## Bug Fixes
- Fix datetime.utcnow() deprecation warning in netam/models.py
- Enhanced error messages with suggestions and usage hints
- Comprehensive parameter validation for transformer models
## Testing
- 25 comprehensive tests covering all new functionality
- Tests for error conditions, validation, and edge cases
- All existing tests still pass (113 total)
## Documentation
- Enhanced docstrings with examples and parameter details
- 6 example configuration files (5 YAML + 1 JSON)
- Clear usage examples for all new functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* refactor: Remove JSON support and move presets to config files
Based on PR feedback:
- Remove JSON configuration support to maintain YAML-only approach
- Move preset configurations from hardcoded dictionary to model_configs/ directory
- Add list_available_presets() function for preset discovery
- Update package configuration to include model_configs/*.yaml files
This change improves consistency by using YAML throughout and separates
configuration from code, making presets easier to maintain and extend.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
* more robust configuration of MODEL_CONFIGS_DIR
---------
Co-authored-by: Claude <[email protected]>
1 parent fa28bdf commit da1e025
File tree
15 files changed
+964
-3
lines changed- examples
- netam
- model_configs
- tests
15 files changed
+964
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments