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
👔 Project settings is now encapsulated into guidellm.config module (#17)
* The module is currently has only `__init__` file
* All `os.getenv` replaced with `pydantic_settings` facade
* `GUIDELLM__` env prefix is set
---------
Co-authored-by: Dmytro Parfeniuk <[email protected]>
The project follows a standard Python project structure:
35
+
33
36
```plaintext
34
37
guidellm/
35
38
├── src/
@@ -51,14 +54,15 @@ guidellm/
51
54
To set up your development environment, follow these steps:
52
55
53
56
1. Install pre-commit hooks:
54
-
```bash
55
-
pre-commit install
56
-
```
57
+
58
+
```bash
59
+
pre-commit install
60
+
```
57
61
58
62
2. Ensure all dependencies are installed:
59
-
```bash
60
-
pip install -e .[dev]
61
-
```
63
+
```bash
64
+
pip install -e .[dev]
65
+
```
62
66
63
67
## Code Quality and Style Guidelines
64
68
@@ -70,39 +74,39 @@ Ruff is used for linting and formatting checks.
70
74
71
75
- Configuration is in `pyproject.toml`.
72
76
- To run Ruff:
73
-
```bash
74
-
ruff check src tests
75
-
```
77
+
```bash
78
+
ruff check src tests
79
+
```
76
80
77
81
### Isort
78
82
79
83
Isort is used for sorting imports.
80
84
81
85
- Configuration is in `pyproject.toml`.
82
86
- To sort imports:
83
-
```bash
84
-
isort src tests
85
-
```
87
+
```bash
88
+
isort src tests
89
+
```
86
90
87
91
### Flake8
88
92
89
93
Flake8 is used for linting.
90
94
91
95
- Configuration is in `tox.ini`.
92
96
- To run Flake8:
93
-
```bash
94
-
flake8 src tests --max-line-length 88
95
-
```
97
+
```bash
98
+
flake8 src tests --max-line-length 88
99
+
```
96
100
97
101
### MyPy
98
102
99
103
MyPy is used for type checking.
100
104
101
105
- Configuration is in `pyproject.toml`.
102
106
- To run MyPy:
103
-
```bash
104
-
mypy src/guidellm
105
-
```
107
+
```bash
108
+
mypy src/guidellm
109
+
```
106
110
107
111
## Testing
108
112
@@ -111,6 +115,7 @@ We use `pytest` for running tests.
111
115
### Running All Tests
112
116
113
117
To run all tests:
118
+
114
119
```bash
115
120
tox
116
121
```
@@ -150,6 +155,7 @@ tox -e test-e2e
150
155
```
151
156
152
157
## Formatting, Linting, and Type Checking
158
+
153
159
### Running Quality Checks (Linting)
154
160
155
161
To run quality checks (ruff, isort, flake8, mypy), use the following command:
@@ -204,6 +210,24 @@ Please refer to the CONTRIBUTING.md file for guidelines on how to contribute to
204
210
205
211
Please refer to the MAINTAINERS file for maintenance guidelines and contact information.
206
212
213
+
## Project configuration
214
+
215
+
The project configuartion is powered by _[`🔗 pydantic-settings`](https://docs.pydantic.dev/latest/concepts/pydantic_settings/)_
216
+
217
+
The project configuration entry point is represented by lazy-loaded `settigns` singleton object ( `src/config/__init__` )
218
+
219
+
The project is fully configurable with environment variables. With that configuration set you can load parameters to `LoggingSettings()` by using environment variables. Just run `export GUIDELLM__LOGGING__DISABLED=true` or `export GUIDELLM__LOGGING__NESTED=another_value` respectfully. The nesting delimiter is `__`.
|`GUIDELLM__LOGGING__DISABLED`|`False`| Determines whether logger for the `guidellm` package is disabled or not |
226
+
|`GUIDELLM__LOGGING__LOG_LEVEL`|`INFO`| The level of `guidellm` package logging |
227
+
|`GUIDELLM__LOGGING__LOG_FILE`|`guidellm.log`| The name of a log file |
228
+
|`GUIDELLM__OPENAI__BASE_URL`|`http://localhost:8080`| The address to the **OpenAI-compatible** server.<br><br>OpenAI live base url is `https://api.openai.com/v1`|
229
+
|`GUIDELLM__OPENAI__API_KEY`|`invalid`| Corresponds to the **OpenAI-compatible** server API key.<br><br>If you look for the live key - check [this link](https://platform.openai.com/api-keys). |
230
+
207
231
## Contact and Support
208
232
209
233
If you need help or have any questions, please open an issue on GitHub or contact us at [email protected].
0 commit comments