fenn 0.0.2__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.
- fenn-0.0.2/LICENSE +21 -0
- fenn-0.0.2/PKG-INFO +185 -0
- fenn-0.0.2/README.md +143 -0
- fenn-0.0.2/pyproject.toml +66 -0
- fenn-0.0.2/setup.cfg +4 -0
- fenn-0.0.2/src/fenn.egg-info/PKG-INFO +185 -0
- fenn-0.0.2/src/fenn.egg-info/SOURCES.txt +30 -0
- fenn-0.0.2/src/fenn.egg-info/dependency_links.txt +1 -0
- fenn-0.0.2/src/fenn.egg-info/entry_points.txt +2 -0
- fenn-0.0.2/src/fenn.egg-info/requires.txt +18 -0
- fenn-0.0.2/src/fenn.egg-info/top_level.txt +2 -0
- fenn-0.0.2/src/smle/__init__.py +88 -0
- fenn-0.0.2/src/smle/args/__init__.py +1 -0
- fenn-0.0.2/src/smle/args/parser.py +100 -0
- fenn-0.0.2/src/smle/cli/__init__.py +73 -0
- fenn-0.0.2/src/smle/cli/create_command.py +31 -0
- fenn-0.0.2/src/smle/cli/init_command.py +41 -0
- fenn-0.0.2/src/smle/cli/templates/empty.py +13 -0
- fenn-0.0.2/src/smle/cli/utils.py +7 -0
- fenn-0.0.2/src/smle/logging/__init__.py +1 -0
- fenn-0.0.2/src/smle/logging/logger.py +108 -0
- fenn-0.0.2/src/smle/notification/__init__.py +2 -0
- fenn-0.0.2/src/smle/notification/notifier.py +65 -0
- fenn-0.0.2/src/smle/notification/service.py +20 -0
- fenn-0.0.2/src/smle/notification/services/__init__.py +2 -0
- fenn-0.0.2/src/smle/notification/services/discord.py +33 -0
- fenn-0.0.2/src/smle/notification/services/telegram.py +49 -0
- fenn-0.0.2/src/smle/secrets/__init__.py +1 -0
- fenn-0.0.2/src/smle/secrets/keystore.py +27 -0
- fenn-0.0.2/src/smle/utils/__init__.py +58 -0
- fenn-0.0.2/src/tests/conftest.py +6 -0
- fenn-0.0.2/src/tests/notification/test_discord_service.py +48 -0
fenn-0.0.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Alessio Russo
|
|
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.
|
fenn-0.0.2/PKG-INFO
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fenn
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Friendly Environment for Neural Networks - A simple framework that takes care of the boring stuff in ML projects.
|
|
5
|
+
Author-email: Alessio Russo <alessio.russo.ar98@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://pysmle.org
|
|
7
|
+
Project-URL: Documentation, https://pysmle.org
|
|
8
|
+
Project-URL: Source Code, https://github.com/blkdmr/smle
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/blkdmr/smle/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: PyYAML>=6.0.3
|
|
26
|
+
Requires-Dist: wandb>=0.23.0
|
|
27
|
+
Requires-Dist: numpy<2.3.0,>=2
|
|
28
|
+
Requires-Dist: pandas>=2.3.3
|
|
29
|
+
Requires-Dist: matplotlib>=3.10.7
|
|
30
|
+
Requires-Dist: scikit-learn>=1.7.2
|
|
31
|
+
Requires-Dist: colorama>=0.4.6
|
|
32
|
+
Requires-Dist: requests>=2.32.5
|
|
33
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
34
|
+
Provides-Extra: torch
|
|
35
|
+
Requires-Dist: torch>=2.9.1; extra == "torch"
|
|
36
|
+
Requires-Dist: torchvision>=0.24.1; extra == "torch"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
39
|
+
Requires-Dist: requests-mock>=1.11.0; extra == "test"
|
|
40
|
+
Requires-Dist: Faker>=25.0.0; extra == "test"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# pySMLE: Simplify Machine Learning Environments
|
|
44
|
+
|
|
45
|
+
  [](https://app.codacy.com/gh/blkdmr/pysmle/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
46
|
+
|
|
47
|
+
  [](https://pypi.org/project/smle/)
|
|
48
|
+
|
|
49
|
+
[](https://discord.gg/WxDkvktBAa)
|
|
50
|
+
|
|
51
|
+
**Stop writing boilerplate. Start training.**
|
|
52
|
+
|
|
53
|
+
pySMLE (you can simply call it **SMILE**) is a lightweight Python framework that automates the "boring stuff" in Machine Learning projects. It handles configuration parsing, logging setup, and experiment tracking so you can focus on the model.
|
|
54
|
+
|
|
55
|
+
## Why pySMLE?
|
|
56
|
+
|
|
57
|
+
* **Auto-Configuration:** `yaml` files are automatically parsed and injected into your entrypoint. No more hardcoded hyperparameters.
|
|
58
|
+
* **Instant Logging:** All print statements and configs are automatically captured to local logs and remote trackers.
|
|
59
|
+
* **Remote Monitoring:** Native integration with [Weights & Biases (WandB)](https://wandb.ai/) to monitor experiments from anywhere.
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install smle
|
|
65
|
+
````
|
|
66
|
+
|
|
67
|
+
## Quickstart
|
|
68
|
+
|
|
69
|
+
### Initialize a Project
|
|
70
|
+
|
|
71
|
+
Run the CLI tool to generate a template and config file:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
smle init
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Configuration
|
|
78
|
+
|
|
79
|
+
pySMLE relies on a simple YAML structure to define hyperparameters, paths, logging options, and integrations.
|
|
80
|
+
You can configure the ``smle.yaml`` file with the hyperparameters and options for your project.
|
|
81
|
+
|
|
82
|
+
The structure of the ``smle.yaml`` file is:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
# ---------------------------------------
|
|
86
|
+
# pySMLE Configuration (Modify Carefully)
|
|
87
|
+
# ---------------------------------------
|
|
88
|
+
|
|
89
|
+
project: project_name
|
|
90
|
+
|
|
91
|
+
# ---------------------------
|
|
92
|
+
# Logging & Tracking
|
|
93
|
+
# ---------------------------
|
|
94
|
+
|
|
95
|
+
logger:
|
|
96
|
+
dir: logger
|
|
97
|
+
|
|
98
|
+
wandb:
|
|
99
|
+
entity: your_wandb_account
|
|
100
|
+
|
|
101
|
+
# ---------------------------------------
|
|
102
|
+
# Example of User Section
|
|
103
|
+
# ---------------------------------------
|
|
104
|
+
|
|
105
|
+
seed: seed
|
|
106
|
+
device: 'cpu'/'cuda'
|
|
107
|
+
|
|
108
|
+
training:
|
|
109
|
+
epochs: n_epochs
|
|
110
|
+
lr: lr
|
|
111
|
+
weight_decay: wd
|
|
112
|
+
batch: batch_size
|
|
113
|
+
|
|
114
|
+
testing:
|
|
115
|
+
batch: batch_size
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Note.**
|
|
119
|
+
pySMLE expects your Weights and Biases API key to be in the environment variable `WANDB_API_KEY`.
|
|
120
|
+
You can put it in the `.env` file, but ensure `.env` is in your `.gitignore`.
|
|
121
|
+
|
|
122
|
+
### Write Your Code
|
|
123
|
+
|
|
124
|
+
Use the `@app.entrypoint` decorator. Your configuration variables are automatically passed via `args`.
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
from smle import SMLE()
|
|
128
|
+
|
|
129
|
+
app = SMLE()
|
|
130
|
+
|
|
131
|
+
@app.entrypoint
|
|
132
|
+
def main(args):
|
|
133
|
+
# 'args' contains your pysmle.yaml configurations
|
|
134
|
+
print(f"Training with learning rate: {args['training']['lr']}")
|
|
135
|
+
|
|
136
|
+
# Your logic here...
|
|
137
|
+
|
|
138
|
+
if __name__ == "__main__":
|
|
139
|
+
app.run()
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
By default, pySMLE will look for a configuration file named `smle.yaml` in the current directory. If you would like to use a different name, a different location, or have multiple configuration files for different configurations, you can set the `config_file` property of pySMLE to the path of your file. You must assign the filename before calling `run()`.
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
app = SMLE()
|
|
146
|
+
app.config_file = "my_file.yaml"
|
|
147
|
+
...
|
|
148
|
+
app.run()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Run It
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
python main.py
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Contributing
|
|
158
|
+
|
|
159
|
+
Contributions are welcome!
|
|
160
|
+
|
|
161
|
+
If you’re interested in helping, please feel free to join our [discord server](https://discord.gg/WxDkvktBAa) or the dedicated
|
|
162
|
+
[discussion page](https://github.com/blkdmr/pysmle/discussions/11) and ping there your availability.
|
|
163
|
+
|
|
164
|
+
We can then discuss a possible contribution together, answer any questions, and help you get started!
|
|
165
|
+
|
|
166
|
+
**Please, before opening a pull request, consult our CONTRIBUTING.md**
|
|
167
|
+
|
|
168
|
+
Thank you for your support!
|
|
169
|
+
|
|
170
|
+
## Roadmap
|
|
171
|
+
|
|
172
|
+
### High Priority
|
|
173
|
+
|
|
174
|
+
- **Documentation:** Write comprehensive documentation and examples.
|
|
175
|
+
|
|
176
|
+
### Planned Features
|
|
177
|
+
|
|
178
|
+
- **ML Templates:** Automated creation of standard project structures.
|
|
179
|
+
- **Model Tools:** Utilities for Neural Network creation, training, and testing.
|
|
180
|
+
- **Notifications:** Email notification system for completed training runs.
|
|
181
|
+
- **Data Tools:** Data exploration and visualization helpers.
|
|
182
|
+
- **Analysis:** Result analysis tools (diagrams, confusion matrices, etc.).
|
|
183
|
+
- **Integrations:** Support for TensorBoard and similar tracking tools.
|
|
184
|
+
- **Testing:** Comprehensive unit and integration tests for the framework.
|
|
185
|
+
|
fenn-0.0.2/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# pySMLE: Simplify Machine Learning Environments
|
|
2
|
+
|
|
3
|
+
  [](https://app.codacy.com/gh/blkdmr/pysmle/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
4
|
+
|
|
5
|
+
  [](https://pypi.org/project/smle/)
|
|
6
|
+
|
|
7
|
+
[](https://discord.gg/WxDkvktBAa)
|
|
8
|
+
|
|
9
|
+
**Stop writing boilerplate. Start training.**
|
|
10
|
+
|
|
11
|
+
pySMLE (you can simply call it **SMILE**) is a lightweight Python framework that automates the "boring stuff" in Machine Learning projects. It handles configuration parsing, logging setup, and experiment tracking so you can focus on the model.
|
|
12
|
+
|
|
13
|
+
## Why pySMLE?
|
|
14
|
+
|
|
15
|
+
* **Auto-Configuration:** `yaml` files are automatically parsed and injected into your entrypoint. No more hardcoded hyperparameters.
|
|
16
|
+
* **Instant Logging:** All print statements and configs are automatically captured to local logs and remote trackers.
|
|
17
|
+
* **Remote Monitoring:** Native integration with [Weights & Biases (WandB)](https://wandb.ai/) to monitor experiments from anywhere.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install smle
|
|
23
|
+
````
|
|
24
|
+
|
|
25
|
+
## Quickstart
|
|
26
|
+
|
|
27
|
+
### Initialize a Project
|
|
28
|
+
|
|
29
|
+
Run the CLI tool to generate a template and config file:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
smle init
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Configuration
|
|
36
|
+
|
|
37
|
+
pySMLE relies on a simple YAML structure to define hyperparameters, paths, logging options, and integrations.
|
|
38
|
+
You can configure the ``smle.yaml`` file with the hyperparameters and options for your project.
|
|
39
|
+
|
|
40
|
+
The structure of the ``smle.yaml`` file is:
|
|
41
|
+
|
|
42
|
+
```yaml
|
|
43
|
+
# ---------------------------------------
|
|
44
|
+
# pySMLE Configuration (Modify Carefully)
|
|
45
|
+
# ---------------------------------------
|
|
46
|
+
|
|
47
|
+
project: project_name
|
|
48
|
+
|
|
49
|
+
# ---------------------------
|
|
50
|
+
# Logging & Tracking
|
|
51
|
+
# ---------------------------
|
|
52
|
+
|
|
53
|
+
logger:
|
|
54
|
+
dir: logger
|
|
55
|
+
|
|
56
|
+
wandb:
|
|
57
|
+
entity: your_wandb_account
|
|
58
|
+
|
|
59
|
+
# ---------------------------------------
|
|
60
|
+
# Example of User Section
|
|
61
|
+
# ---------------------------------------
|
|
62
|
+
|
|
63
|
+
seed: seed
|
|
64
|
+
device: 'cpu'/'cuda'
|
|
65
|
+
|
|
66
|
+
training:
|
|
67
|
+
epochs: n_epochs
|
|
68
|
+
lr: lr
|
|
69
|
+
weight_decay: wd
|
|
70
|
+
batch: batch_size
|
|
71
|
+
|
|
72
|
+
testing:
|
|
73
|
+
batch: batch_size
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Note.**
|
|
77
|
+
pySMLE expects your Weights and Biases API key to be in the environment variable `WANDB_API_KEY`.
|
|
78
|
+
You can put it in the `.env` file, but ensure `.env` is in your `.gitignore`.
|
|
79
|
+
|
|
80
|
+
### Write Your Code
|
|
81
|
+
|
|
82
|
+
Use the `@app.entrypoint` decorator. Your configuration variables are automatically passed via `args`.
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from smle import SMLE()
|
|
86
|
+
|
|
87
|
+
app = SMLE()
|
|
88
|
+
|
|
89
|
+
@app.entrypoint
|
|
90
|
+
def main(args):
|
|
91
|
+
# 'args' contains your pysmle.yaml configurations
|
|
92
|
+
print(f"Training with learning rate: {args['training']['lr']}")
|
|
93
|
+
|
|
94
|
+
# Your logic here...
|
|
95
|
+
|
|
96
|
+
if __name__ == "__main__":
|
|
97
|
+
app.run()
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
By default, pySMLE will look for a configuration file named `smle.yaml` in the current directory. If you would like to use a different name, a different location, or have multiple configuration files for different configurations, you can set the `config_file` property of pySMLE to the path of your file. You must assign the filename before calling `run()`.
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
app = SMLE()
|
|
104
|
+
app.config_file = "my_file.yaml"
|
|
105
|
+
...
|
|
106
|
+
app.run()
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Run It
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python main.py
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Contributing
|
|
116
|
+
|
|
117
|
+
Contributions are welcome!
|
|
118
|
+
|
|
119
|
+
If you’re interested in helping, please feel free to join our [discord server](https://discord.gg/WxDkvktBAa) or the dedicated
|
|
120
|
+
[discussion page](https://github.com/blkdmr/pysmle/discussions/11) and ping there your availability.
|
|
121
|
+
|
|
122
|
+
We can then discuss a possible contribution together, answer any questions, and help you get started!
|
|
123
|
+
|
|
124
|
+
**Please, before opening a pull request, consult our CONTRIBUTING.md**
|
|
125
|
+
|
|
126
|
+
Thank you for your support!
|
|
127
|
+
|
|
128
|
+
## Roadmap
|
|
129
|
+
|
|
130
|
+
### High Priority
|
|
131
|
+
|
|
132
|
+
- **Documentation:** Write comprehensive documentation and examples.
|
|
133
|
+
|
|
134
|
+
### Planned Features
|
|
135
|
+
|
|
136
|
+
- **ML Templates:** Automated creation of standard project structures.
|
|
137
|
+
- **Model Tools:** Utilities for Neural Network creation, training, and testing.
|
|
138
|
+
- **Notifications:** Email notification system for completed training runs.
|
|
139
|
+
- **Data Tools:** Data exploration and visualization helpers.
|
|
140
|
+
- **Analysis:** Result analysis tools (diagrams, confusion matrices, etc.).
|
|
141
|
+
- **Integrations:** Support for TensorBoard and similar tracking tools.
|
|
142
|
+
- **Testing:** Comprehensive unit and integration tests for the framework.
|
|
143
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fenn"
|
|
7
|
+
version = "0.0.2"
|
|
8
|
+
description = "Friendly Environment for Neural Networks - A simple framework that takes care of the boring stuff in ML projects."
|
|
9
|
+
|
|
10
|
+
authors = [
|
|
11
|
+
{ name="Alessio Russo", email="alessio.russo.ar98@gmail.com" },
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Intended Audience :: Science/Research",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
21
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Programming Language :: Python",
|
|
24
|
+
"Programming Language :: Python :: 3",
|
|
25
|
+
"Programming Language :: Python :: 3.10",
|
|
26
|
+
"Programming Language :: Python :: 3.11",
|
|
27
|
+
"Programming Language :: Python :: 3.12",
|
|
28
|
+
"Operating System :: OS Independent",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
dependencies = [
|
|
32
|
+
"PyYAML>=6.0.3",
|
|
33
|
+
"wandb>=0.23.0",
|
|
34
|
+
"numpy>=2,<2.3.0",
|
|
35
|
+
"pandas>=2.3.3",
|
|
36
|
+
"matplotlib>=3.10.7",
|
|
37
|
+
"scikit-learn>=1.7.2",
|
|
38
|
+
"colorama>=0.4.6",
|
|
39
|
+
"requests>=2.32.5",
|
|
40
|
+
"python-dotenv>=1.2.1"
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
requires-python = ">=3.11"
|
|
44
|
+
|
|
45
|
+
[project.optional-dependencies]
|
|
46
|
+
torch = [
|
|
47
|
+
"torch>=2.9.1",
|
|
48
|
+
"torchvision>=0.24.1"
|
|
49
|
+
]
|
|
50
|
+
test = [
|
|
51
|
+
"pytest>=8.0.0",
|
|
52
|
+
"requests-mock>=1.11.0",
|
|
53
|
+
"Faker>=25.0.0"
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.packages.find]
|
|
57
|
+
where = ["src"]
|
|
58
|
+
|
|
59
|
+
[project.scripts]
|
|
60
|
+
smle = "smle.cli:main"
|
|
61
|
+
|
|
62
|
+
[project.urls]
|
|
63
|
+
"Homepage" = "https://pysmle.org"
|
|
64
|
+
"Documentation" = "https://pysmle.org"
|
|
65
|
+
"Source Code" = "https://github.com/blkdmr/smle"
|
|
66
|
+
"Bug Tracker" = "https://github.com/blkdmr/smle/issues"
|
fenn-0.0.2/setup.cfg
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fenn
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Friendly Environment for Neural Networks - A simple framework that takes care of the boring stuff in ML projects.
|
|
5
|
+
Author-email: Alessio Russo <alessio.russo.ar98@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://pysmle.org
|
|
7
|
+
Project-URL: Documentation, https://pysmle.org
|
|
8
|
+
Project-URL: Source Code, https://github.com/blkdmr/smle
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/blkdmr/smle/issues
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Operating System :: OS Independent
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: PyYAML>=6.0.3
|
|
26
|
+
Requires-Dist: wandb>=0.23.0
|
|
27
|
+
Requires-Dist: numpy<2.3.0,>=2
|
|
28
|
+
Requires-Dist: pandas>=2.3.3
|
|
29
|
+
Requires-Dist: matplotlib>=3.10.7
|
|
30
|
+
Requires-Dist: scikit-learn>=1.7.2
|
|
31
|
+
Requires-Dist: colorama>=0.4.6
|
|
32
|
+
Requires-Dist: requests>=2.32.5
|
|
33
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
34
|
+
Provides-Extra: torch
|
|
35
|
+
Requires-Dist: torch>=2.9.1; extra == "torch"
|
|
36
|
+
Requires-Dist: torchvision>=0.24.1; extra == "torch"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
39
|
+
Requires-Dist: requests-mock>=1.11.0; extra == "test"
|
|
40
|
+
Requires-Dist: Faker>=25.0.0; extra == "test"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# pySMLE: Simplify Machine Learning Environments
|
|
44
|
+
|
|
45
|
+
  [](https://app.codacy.com/gh/blkdmr/pysmle/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
46
|
+
|
|
47
|
+
  [](https://pypi.org/project/smle/)
|
|
48
|
+
|
|
49
|
+
[](https://discord.gg/WxDkvktBAa)
|
|
50
|
+
|
|
51
|
+
**Stop writing boilerplate. Start training.**
|
|
52
|
+
|
|
53
|
+
pySMLE (you can simply call it **SMILE**) is a lightweight Python framework that automates the "boring stuff" in Machine Learning projects. It handles configuration parsing, logging setup, and experiment tracking so you can focus on the model.
|
|
54
|
+
|
|
55
|
+
## Why pySMLE?
|
|
56
|
+
|
|
57
|
+
* **Auto-Configuration:** `yaml` files are automatically parsed and injected into your entrypoint. No more hardcoded hyperparameters.
|
|
58
|
+
* **Instant Logging:** All print statements and configs are automatically captured to local logs and remote trackers.
|
|
59
|
+
* **Remote Monitoring:** Native integration with [Weights & Biases (WandB)](https://wandb.ai/) to monitor experiments from anywhere.
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install smle
|
|
65
|
+
````
|
|
66
|
+
|
|
67
|
+
## Quickstart
|
|
68
|
+
|
|
69
|
+
### Initialize a Project
|
|
70
|
+
|
|
71
|
+
Run the CLI tool to generate a template and config file:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
smle init
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Configuration
|
|
78
|
+
|
|
79
|
+
pySMLE relies on a simple YAML structure to define hyperparameters, paths, logging options, and integrations.
|
|
80
|
+
You can configure the ``smle.yaml`` file with the hyperparameters and options for your project.
|
|
81
|
+
|
|
82
|
+
The structure of the ``smle.yaml`` file is:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
# ---------------------------------------
|
|
86
|
+
# pySMLE Configuration (Modify Carefully)
|
|
87
|
+
# ---------------------------------------
|
|
88
|
+
|
|
89
|
+
project: project_name
|
|
90
|
+
|
|
91
|
+
# ---------------------------
|
|
92
|
+
# Logging & Tracking
|
|
93
|
+
# ---------------------------
|
|
94
|
+
|
|
95
|
+
logger:
|
|
96
|
+
dir: logger
|
|
97
|
+
|
|
98
|
+
wandb:
|
|
99
|
+
entity: your_wandb_account
|
|
100
|
+
|
|
101
|
+
# ---------------------------------------
|
|
102
|
+
# Example of User Section
|
|
103
|
+
# ---------------------------------------
|
|
104
|
+
|
|
105
|
+
seed: seed
|
|
106
|
+
device: 'cpu'/'cuda'
|
|
107
|
+
|
|
108
|
+
training:
|
|
109
|
+
epochs: n_epochs
|
|
110
|
+
lr: lr
|
|
111
|
+
weight_decay: wd
|
|
112
|
+
batch: batch_size
|
|
113
|
+
|
|
114
|
+
testing:
|
|
115
|
+
batch: batch_size
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Note.**
|
|
119
|
+
pySMLE expects your Weights and Biases API key to be in the environment variable `WANDB_API_KEY`.
|
|
120
|
+
You can put it in the `.env` file, but ensure `.env` is in your `.gitignore`.
|
|
121
|
+
|
|
122
|
+
### Write Your Code
|
|
123
|
+
|
|
124
|
+
Use the `@app.entrypoint` decorator. Your configuration variables are automatically passed via `args`.
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
from smle import SMLE()
|
|
128
|
+
|
|
129
|
+
app = SMLE()
|
|
130
|
+
|
|
131
|
+
@app.entrypoint
|
|
132
|
+
def main(args):
|
|
133
|
+
# 'args' contains your pysmle.yaml configurations
|
|
134
|
+
print(f"Training with learning rate: {args['training']['lr']}")
|
|
135
|
+
|
|
136
|
+
# Your logic here...
|
|
137
|
+
|
|
138
|
+
if __name__ == "__main__":
|
|
139
|
+
app.run()
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
By default, pySMLE will look for a configuration file named `smle.yaml` in the current directory. If you would like to use a different name, a different location, or have multiple configuration files for different configurations, you can set the `config_file` property of pySMLE to the path of your file. You must assign the filename before calling `run()`.
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
app = SMLE()
|
|
146
|
+
app.config_file = "my_file.yaml"
|
|
147
|
+
...
|
|
148
|
+
app.run()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Run It
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
python main.py
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Contributing
|
|
158
|
+
|
|
159
|
+
Contributions are welcome!
|
|
160
|
+
|
|
161
|
+
If you’re interested in helping, please feel free to join our [discord server](https://discord.gg/WxDkvktBAa) or the dedicated
|
|
162
|
+
[discussion page](https://github.com/blkdmr/pysmle/discussions/11) and ping there your availability.
|
|
163
|
+
|
|
164
|
+
We can then discuss a possible contribution together, answer any questions, and help you get started!
|
|
165
|
+
|
|
166
|
+
**Please, before opening a pull request, consult our CONTRIBUTING.md**
|
|
167
|
+
|
|
168
|
+
Thank you for your support!
|
|
169
|
+
|
|
170
|
+
## Roadmap
|
|
171
|
+
|
|
172
|
+
### High Priority
|
|
173
|
+
|
|
174
|
+
- **Documentation:** Write comprehensive documentation and examples.
|
|
175
|
+
|
|
176
|
+
### Planned Features
|
|
177
|
+
|
|
178
|
+
- **ML Templates:** Automated creation of standard project structures.
|
|
179
|
+
- **Model Tools:** Utilities for Neural Network creation, training, and testing.
|
|
180
|
+
- **Notifications:** Email notification system for completed training runs.
|
|
181
|
+
- **Data Tools:** Data exploration and visualization helpers.
|
|
182
|
+
- **Analysis:** Result analysis tools (diagrams, confusion matrices, etc.).
|
|
183
|
+
- **Integrations:** Support for TensorBoard and similar tracking tools.
|
|
184
|
+
- **Testing:** Comprehensive unit and integration tests for the framework.
|
|
185
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/fenn.egg-info/PKG-INFO
|
|
5
|
+
src/fenn.egg-info/SOURCES.txt
|
|
6
|
+
src/fenn.egg-info/dependency_links.txt
|
|
7
|
+
src/fenn.egg-info/entry_points.txt
|
|
8
|
+
src/fenn.egg-info/requires.txt
|
|
9
|
+
src/fenn.egg-info/top_level.txt
|
|
10
|
+
src/smle/__init__.py
|
|
11
|
+
src/smle/args/__init__.py
|
|
12
|
+
src/smle/args/parser.py
|
|
13
|
+
src/smle/cli/__init__.py
|
|
14
|
+
src/smle/cli/create_command.py
|
|
15
|
+
src/smle/cli/init_command.py
|
|
16
|
+
src/smle/cli/utils.py
|
|
17
|
+
src/smle/cli/templates/empty.py
|
|
18
|
+
src/smle/logging/__init__.py
|
|
19
|
+
src/smle/logging/logger.py
|
|
20
|
+
src/smle/notification/__init__.py
|
|
21
|
+
src/smle/notification/notifier.py
|
|
22
|
+
src/smle/notification/service.py
|
|
23
|
+
src/smle/notification/services/__init__.py
|
|
24
|
+
src/smle/notification/services/discord.py
|
|
25
|
+
src/smle/notification/services/telegram.py
|
|
26
|
+
src/smle/secrets/__init__.py
|
|
27
|
+
src/smle/secrets/keystore.py
|
|
28
|
+
src/smle/utils/__init__.py
|
|
29
|
+
src/tests/conftest.py
|
|
30
|
+
src/tests/notification/test_discord_service.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
PyYAML>=6.0.3
|
|
2
|
+
wandb>=0.23.0
|
|
3
|
+
numpy<2.3.0,>=2
|
|
4
|
+
pandas>=2.3.3
|
|
5
|
+
matplotlib>=3.10.7
|
|
6
|
+
scikit-learn>=1.7.2
|
|
7
|
+
colorama>=0.4.6
|
|
8
|
+
requests>=2.32.5
|
|
9
|
+
python-dotenv>=1.2.1
|
|
10
|
+
|
|
11
|
+
[test]
|
|
12
|
+
pytest>=8.0.0
|
|
13
|
+
requests-mock>=1.11.0
|
|
14
|
+
Faker>=25.0.0
|
|
15
|
+
|
|
16
|
+
[torch]
|
|
17
|
+
torch>=2.9.1
|
|
18
|
+
torchvision>=0.24.1
|