ai-accelerator 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,1079 @@
1
+ Metadata-Version: 2.4
2
+ Name: ai-accelerator
3
+ Version: 0.1.0
4
+ Summary: AI Accelerator Platform - Deploy, monitor, and govern machine learning models in production
5
+ License: Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based upon (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and derivative works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to use, reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, trademark, patent,
105
+ attribution and other notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright notice to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Support, Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "page" as the copyright notice for easier identification within
190
+ third-party archives.
191
+
192
+ Copyright 2026 AI Accelerator Team
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
205
+ Project-URL: Homepage, https://github.com/AyoubArdem/ai-accelerator
206
+ Project-URL: Repository, https://github.com/AyoubArdem/ai-accelerator
207
+ Project-URL: Issues, https://github.com/AyoubArdem/ai-accelerator/issues
208
+ Project-URL: Documentation, https://ai-accelerator.readthedocs.io/
209
+ Classifier: Development Status :: 3 - Alpha
210
+ Classifier: Intended Audience :: Developers
211
+ Classifier: License :: OSI Approved :: Apache Software License
212
+ Classifier: Operating System :: OS Independent
213
+ Classifier: Programming Language :: Python :: 3
214
+ Classifier: Programming Language :: Python :: 3.8
215
+ Classifier: Programming Language :: Python :: 3.9
216
+ Classifier: Programming Language :: Python :: 3.10
217
+ Classifier: Programming Language :: Python :: 3.11
218
+ Classifier: Programming Language :: Python :: 3.12
219
+ Classifier: Framework :: Django
220
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
221
+ Requires-Python: >=3.8
222
+ Description-Content-Type: text/markdown
223
+ License-File: LICENSE
224
+ Requires-Dist: Django>=5.2.8
225
+ Requires-Dist: djangorestframework>=3.14.0
226
+ Requires-Dist: drf-spectacular>=0.26.5
227
+ Requires-Dist: typer>=0.9.0
228
+ Requires-Dist: rich>=13.7.0
229
+ Requires-Dist: celery>=5.3.4
230
+ Requires-Dist: redis>=5.0.1
231
+ Requires-Dist: docker>=7.0.0
232
+ Requires-Dist: numpy>=1.24.3
233
+ Requires-Dist: scipy>=1.11.4
234
+ Requires-Dist: psycopg2-binary>=2.9.9
235
+ Requires-Dist: python-decouple>=3.8
236
+ Provides-Extra: dev
237
+ Requires-Dist: pytest>=7.4.3; extra == "dev"
238
+ Requires-Dist: pytest-django>=4.5.2; extra == "dev"
239
+ Requires-Dist: black>=23.12.1; extra == "dev"
240
+ Requires-Dist: flake8>=6.1.0; extra == "dev"
241
+ Requires-Dist: isort>=5.13.2; extra == "dev"
242
+ Requires-Dist: pre-commit>=3.6.0; extra == "dev"
243
+ Dynamic: license-file
244
+
245
+
246
+ # ๐Ÿš€ AI Accelerator Platform
247
+
248
+ **AI Accelerator** is an end-to-end platform designed to **deploy, monitor, and govern machine learning models in production** in a secure, scalable, and auditable way.
249
+
250
+ [![PyPI version](https://badge.fury.io/py/ai-accelerator.svg)](https://pypi.org/project/ai-accelerator/)
251
+ [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
252
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
253
+
254
+ The project aims to be a **core MLOps foundation** for companies, ML teams, and developers who want to move from experimental notebooks to **real production-grade AI systems**.
255
+
256
+ ## ๐Ÿ“ฆ Installation
257
+
258
+ ### From PyPI (Recommended)
259
+
260
+ ```bash
261
+ pip install ai-accelerator
262
+ ```
263
+
264
+ ### From Source
265
+
266
+ ```bash
267
+ git clone https://github.com/AyoubArdem/ai-accelerator.git
268
+ cd ai-accelerator
269
+ pip install -e .
270
+ ```
271
+
272
+ ### Development Setup
273
+
274
+ For contributors and development:
275
+
276
+ ```bash
277
+ git clone https://github.com/AyoubArdem/ai-accelerator.git
278
+ cd ai-accelerator
279
+
280
+ # Create virtual environment
281
+ python -m venv env1
282
+ source env1/bin/activate # On Windows: env1\Scripts\activate
283
+
284
+ # Install in development mode
285
+ pip install -e .
286
+ pip install -e ".[dev]" # Development dependencies
287
+
288
+ # Run migrations
289
+ python manage.py migrate
290
+
291
+ # Create superuser
292
+ python manage.py createsuperuser
293
+ ```
294
+
295
+ ## ๐Ÿš€ Quick Start
296
+
297
+ ### 1. Start the Platform
298
+
299
+ ```bash
300
+ # Start Django development server
301
+ python manage.py runserver
302
+
303
+ # Server will be available at: http://127.0.0.1:8000
304
+ ```
305
+
306
+ ### 2. Access API Documentation
307
+
308
+ Visit the interactive API documentation:
309
+ - **Swagger UI**: http://127.0.0.1:8000/api/schema/swagger-ui/
310
+ - **ReDoc**: http://127.0.0.1:8000/api/schema/redoc/
311
+
312
+ ### 3. Use the CLI
313
+
314
+ ```bash
315
+ # Check CLI help
316
+ aiac --help
317
+ ```
318
+
319
+ ## ๐Ÿ“š Documentation & Resources
320
+
321
+ | Document | Description |
322
+ |----------|-------------|
323
+ | [**README.md**](README.md) | Project overview, setup, and usage guide |
324
+ | [**CONSOLE.md**](CONSOLE.md) | Detailed AIAC CLI usage instructions |
325
+ | [**CONTRIBUTING.md**](CONTRIBUTING.md) | Guidelines for contributing to the project |
326
+ | [**CHANGELOG.md**](CHANGELOG.md) | Version history and release notes |
327
+ | [**SECURITY.md**](SECURITY.md) | Security policy and vulnerability reporting |
328
+ | [**CODE_OF_CONDUCT.md**](CODE_OF_CONDUCT.md) | Community standards and behavior guidelines |
329
+ | [**LICENSE**](LICENSE) | Apache 2.0 License terms |
330
+
331
+
332
+
333
+ ## ๐ŸŽฏ Project Vision & Goals
334
+
335
+ Modern AI teams face critical challenges:
336
+
337
+ * โŒ Manual and inconsistent model deployment
338
+ * โŒ Lack of monitoring after deployment
339
+ * โŒ No detection of **data drift / model drift**
340
+ * โŒ Missing governance and policy enforcement
341
+ * โŒ Poor auditability and traceability
342
+ * โŒ Over-reliance on complex UIs instead of DevOps tools
343
+
344
+ โœ… **AI Accelerator** addresses these challenges by providing:
345
+
346
+ * Automated model deployment
347
+ * Continuous monitoring & drift detection
348
+ * Governance and policy-based control
349
+ * Security-first architecture
350
+ * A powerful CLI for engineers
351
+
352
+ ---
353
+
354
+ ## ๐Ÿงฑ High-Level Architecture
355
+
356
+ ```
357
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
358
+ โ”‚ CLI โ”‚ โ† aiac
359
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
360
+ โ”‚
361
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
362
+ โ”‚ Django โ”‚
363
+ โ”‚ Backend โ”‚
364
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
365
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
366
+ โ”‚ โ”‚ โ”‚
367
+ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
368
+ |Deployment App โ”‚ โ”‚ Monitoring โ”‚ โ”‚ Governance โ”‚
369
+ โ”‚ (Docker + API)โ”‚ โ”‚ (Drift etc) โ”‚ โ”‚ (Policies) โ”‚
370
+ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
371
+ ```
372
+
373
+ ---
374
+
375
+ ## ๐Ÿ“ฆ Core Applications
376
+
377
+ ### 1๏ธโƒฃ Deployment App
378
+
379
+ Responsible for **deploying ML models as real services**.
380
+
381
+ **Key features:**
382
+
383
+ * Model version management
384
+ * Docker-based deployment
385
+ * Automatic FastAPI inference service
386
+ * Deployment lifecycle tracking (deploying / active / failed)
387
+ * Port governance and runtime control
388
+
389
+ **Why it matters:**
390
+
391
+ > Turns ML models into scalable, production-ready APIs.
392
+
393
+ ---
394
+
395
+ ### 2๏ธโƒฃ Monitoring App
396
+
397
+ Responsible for **observing model behavior in production**.
398
+
399
+ **Key features:**
400
+
401
+ * Collects production features and predictions
402
+ * Performance monitoring (latency, usage)
403
+ * **Data drift & feature drift detection**
404
+ * Drift history tracking
405
+ * Alerting and audit integration
406
+
407
+ **Drift metrics supported:**
408
+
409
+ * Population Stability Index (PSI)
410
+ * Kolmogorovโ€“Smirnov test
411
+ * Wasserstein distance
412
+
413
+ **Why it matters:**
414
+
415
+ > A model without monitoring is a silent failure waiting to happen.
416
+
417
+ ---
418
+
419
+ ### 3๏ธโƒฃ Governance App
420
+
421
+ Responsible for **policies, compliance, and control**.
422
+
423
+ **Key features:**
424
+
425
+ * Declarative governance policies (YAML / metadata-based)
426
+ * Role-based access control (RBAC)
427
+ * Policy enforcement across deployment & monitoring
428
+ * Violation tracking
429
+ * Read-only audit access
430
+
431
+ **An example of Metadata-based**
432
+
433
+ # metadata.yaml
434
+ * version: 1.0
435
+
436
+ ### =========================
437
+ ## Role-Based Access Control
438
+ ### =========================
439
+ > role_permissions:
440
+ * admin:
441
+ - deployment:*
442
+ - monitoring:*
443
+ - governance:*
444
+ - audit:read
445
+
446
+ * engineer:
447
+ - deployment:read
448
+ - deployment:write
449
+ - monitoring:read
450
+
451
+ * auditor:
452
+ - audit:read
453
+
454
+ ### =========================
455
+ ## Deployment Runtime Config
456
+ ### =========================
457
+ > deployment:
458
+ * id : deployment.id,
459
+ * name : deployment.name,
460
+ * port : deployment.port,
461
+ * status : deployment.status,
462
+
463
+ ### =========================
464
+ ## Drift Monitoring Config
465
+ ### =========================
466
+ > drift_monitoring:
467
+ * enabled: true
468
+
469
+ * check_strategy:
470
+ - type: request_based # request_based | time_based
471
+ - every_n_requests: 1000 # used if request_based
472
+ - interval_minutes: 60 # used if time_based
473
+
474
+ > monitoring:
475
+ * enabled: True
476
+
477
+
478
+
479
+
480
+ > metrics:
481
+
482
+ * psi:
483
+ - enabled: true
484
+ - warning: 0.1
485
+ - critical: 0.25
486
+
487
+ * ks_test:
488
+ - enabled: true
489
+ - p_value_threshold: 0.05
490
+
491
+ * wasserstein:
492
+ - enabled: true
493
+ - warning: 0.2
494
+
495
+
496
+
497
+ **Example policies:**
498
+
499
+ * Block deployment outside allowed port ranges
500
+ * Freeze models when severe drift is detected
501
+ * Restrict actions based on user roles
502
+ * Require manual approval for risky operations
503
+
504
+ ---
505
+
506
+ ### 4๏ธโƒฃ AIAC โ€“ Command Line Interface
507
+
508
+ **professional CLI** for interacting with the platform.
509
+
510
+ **Built with:**
511
+
512
+ * Typer
513
+ * Rich
514
+
515
+ **Capabilities:**
516
+
517
+ * Deploy and manage models
518
+ * Monitor metrics and drift
519
+ * Inspect audit logs
520
+ * Validate governance policies
521
+ * Automate workflows (CI/CD friendly)
522
+
523
+ **Why CLI?**
524
+
525
+ * Designed for ML Engineers & DevOps
526
+ * Scriptable and automatable
527
+ * Faster and more reliable than GUIs
528
+
529
+ ---
530
+
531
+ ## ๏ฟฝ๏ธ CLI Commands Reference
532
+
533
+ The AIAC CLI provides comprehensive command-line access to all platform features. Commands are organized into logical groups for easy navigation.
534
+
535
+ ### Authentication Commands
536
+
537
+ ```bash
538
+ # Register a new user account
539
+ aiac auth register
540
+
541
+ # Login to get access tokens
542
+ aiac auth login
543
+
544
+ # Logout and invalidate tokens
545
+ aiac auth logout
546
+ ```
547
+
548
+ ### Deployment Commands
549
+
550
+ ```bash
551
+ # Project Management
552
+ aiac deployment create-project-deployment # Create a new project
553
+ aiac deployment list-projects # List all projects
554
+ aiac deployment delete-project # Delete a project
555
+
556
+ # Model Version Management
557
+ aiac deployment create-model-version # Create a new model version
558
+ aiac deployment list-model-versions # List all model versions
559
+ aiac deployment delete-model-version # Delete a model version
560
+
561
+ # Deployment Operations
562
+ aiac deployment deploy-model-version # Deploy a model version
563
+ aiac deployment redeploy-model # Redeploy an existing deployment
564
+ aiac deployment stop-deployment # Stop a running deployment
565
+ aiac deployment delete-deployment # Delete a deployment
566
+ aiac deployment list-deployments # List all deployments
567
+ aiac deployment get-deployment-details # Get detailed deployment info
568
+ ```
569
+
570
+ ### Monitoring Commands
571
+
572
+ ```bash
573
+ # Deployment Monitoring
574
+ aiac monitoring deploy-stats # View deployment statistics
575
+ aiac monitoring deploy-records # View deployment monitoring records
576
+ aiac monitoring alert # View deployment alerts
577
+
578
+ # Alert Management
579
+ aiac monitoring resolve-alert # Resolve a specific alert
580
+
581
+ # Data Drift Detection
582
+ aiac monitoring detect-drift # Check for data drift on model version
583
+ aiac monitoring samples # Post samples for drift analysis
584
+ ```
585
+
586
+ ### Governance Commands
587
+
588
+ ```bash
589
+ # Policy Management
590
+ aiac governance create-policy # Create a new governance policy
591
+ aiac governance list-policies # List all governance policies
592
+ aiac governance delete-policy # Delete a governance policy
593
+
594
+ # Policy Application
595
+ aiac governance apply-policy # Apply a policy to a deployment
596
+
597
+ # Compliance Monitoring
598
+ aiac governance view-violations # View policy violations
599
+ aiac governance metrics # View violation metrics
600
+ aiac governance alert-logs # View alert logs for violations
601
+ ```
602
+
603
+ ### Command Usage Examples
604
+
605
+ ```bash
606
+ # Complete workflow example
607
+ aiac auth login # Authenticate first
608
+ aiac deployment create-project-deployment # Create project
609
+ aiac deployment create-model-version # Add model version
610
+ aiac deployment deploy-model-version # Deploy the model
611
+ aiac monitoring deploy-stats # Monitor performance
612
+ aiac governance create-policy # Set up governance
613
+ aiac governance apply-policy # Apply policy to deployment
614
+ ```
615
+
616
+ ### Interactive Prompts
617
+
618
+ Most commands use interactive prompts for required parameters:
619
+
620
+ ```bash
621
+ aiac deployment create-project-deployment
622
+ # Will prompt for: owner, project_name, description
623
+
624
+ aiac deployment deploy-model-version
625
+ # Will prompt for: user_id, model_version_id, port
626
+ ```
627
+
628
+ ### Output Formatting
629
+
630
+ Commands use **Rich** library for beautiful terminal output:
631
+ - ๐Ÿ“Š **Tables** for listing data
632
+ - ๐ŸŽจ **Colored output** for status and warnings
633
+ - ๐Ÿ“‹ **Structured information** display
634
+ - โš ๏ธ **Clear error messages** and success confirmations
635
+
636
+ ---
637
+
638
+ ## ๐Ÿ”— API Endpoints
639
+
640
+ The platform provides REST APIs for all functionality. Key endpoints include:
641
+
642
+ ### Authentication
643
+ - `POST /api/auth/login/` - User login
644
+ - `POST /api/auth/register/` - User registration
645
+ - `POST /api/auth/logout/` - User logout
646
+
647
+ ### Deployment Management
648
+ - `GET /api/deployments/projects/` - List projects
649
+ - `POST /api/deployments/projects/` - Create project
650
+ - `GET /api/deployments/versions/` - List model versions
651
+ - `POST /api/deployments/versions/` - Create model version
652
+ - `POST /api/deployments/deploy/` - Deploy model
653
+ - `GET /api/deployments/` - List deployments
654
+
655
+ ### Monitoring
656
+ - `GET /api/monitoring/stats/` - Deployment statistics
657
+ - `POST /api/monitoring/drift/` - Check data drift
658
+ - `GET /api/monitoring/alerts/` - List alerts
659
+
660
+ ### Governance
661
+ - `GET /api/governance/policies/` - List policies
662
+ - `POST /api/governance/policies/` - Create policy
663
+ - `GET /api/governance/violations/` - List violations
664
+
665
+ ## ๐Ÿ” Authentication & Security
666
+
667
+ ### JWT Token Authentication
668
+
669
+ The platform uses JWT (JSON Web Tokens) for API authentication:
670
+
671
+ 1. **Login** to get access and refresh tokens
672
+ 2. **Include token** in Authorization header: `Bearer <access_token>`
673
+ 3. **Refresh tokens** when they expire using the refresh endpoint
674
+
675
+ ### Role-Based Access Control
676
+
677
+ Three user roles with different permissions:
678
+
679
+ - **Admin**: Full access to all features
680
+ - **Engineer**: Deployment and monitoring access
681
+ - **Auditor**: Read-only access to audit logs and compliance data
682
+
683
+ ### Security Features
684
+
685
+ - โœ… JWT-based authentication
686
+ - โœ… Role-based permissions
687
+ - โœ… API key support for model inference
688
+ - โœ… Service tokens for monitoring agents
689
+ - โœ… Immutable audit logging
690
+ - โœ… Input validation and sanitization
691
+
692
+ ---
693
+
694
+ ## ๐Ÿง  Why This Project Matters
695
+
696
+ * ๐Ÿ”น Combines **ML, Backend, DevOps, and Governance**
697
+ * ๐Ÿ”น Inspired by real-world platforms:
698
+
699
+ * AWS SageMaker
700
+ * Google Vertex AI
701
+ * MLflow + Kubernetes ecosystems
702
+ * ๐Ÿ”น Suitable for:
703
+
704
+ * Advanced learning
705
+ * Research-to-production workflows
706
+ * Startup or enterprise foundations
707
+ * ๐Ÿ”น Fully extensible and modular
708
+
709
+ ---
710
+
711
+ ## ๏ฟฝ Docker Deployment
712
+
713
+ The platform supports containerized deployment for production environments.
714
+
715
+ ### Quick Start with Docker Compose
716
+
717
+ ```bash
718
+ # Clone the repository
719
+ git clone https://github.com/AyoubArdem/ai-accelerator.git
720
+ cd ai-accelerator
721
+
722
+ # Start all services
723
+ docker-compose up -d
724
+
725
+ # Services will be available at:
726
+ # - Django API: http://localhost:8000
727
+ # - PostgreSQL: localhost:5432
728
+ # - Redis: localhost:6379
729
+ ```
730
+
731
+ ### Docker Services
732
+
733
+ - **web**: Django application server
734
+ - **db**: PostgreSQL database
735
+ - **redis**: Redis cache and message broker
736
+ - **celery**: Asynchronous task worker
737
+
738
+ ### Environment Configuration
739
+
740
+ Create a `.env` file for configuration:
741
+
742
+ ```env
743
+ # Database
744
+ DATABASE_URL=postgresql://user:password@db:5432/ai_accelerator
745
+
746
+ # Redis
747
+ REDIS_URL=redis://redis:6379/0
748
+
749
+ # Django
750
+ SECRET_KEY=your-secret-key-here
751
+ DEBUG=False
752
+ ALLOWED_HOSTS=localhost,127.0.0.1
753
+
754
+ # JWT
755
+ JWT_SECRET_KEY=your-jwt-secret
756
+ ```
757
+
758
+ ### Building Custom Images
759
+
760
+ ```bash
761
+ # Build the application image
762
+ docker build -t ai-accelerator:latest .
763
+
764
+ # Run with custom configuration
765
+ docker run -p 8000:8000 \
766
+ -e DATABASE_URL=postgresql://... \
767
+ -e REDIS_URL=redis://... \
768
+ ai-accelerator:latest
769
+ ```
770
+ ## ๐Ÿ“ฆ Requirements & Dependencies
771
+
772
+ ### System Requirements
773
+
774
+ - **Python**: 3.8 or higher
775
+ - **Docker**: For containerized model deployment
776
+ - **PostgreSQL**: Primary database (or SQLite for development)
777
+ - **Redis**: For Celery task queue and caching
778
+
779
+ ### Core Dependencies
780
+
781
+ When you install `ai-accelerator`, the following key dependencies are automatically included:
782
+
783
+ **Main requirements:**
784
+ - `Django>=5.2.8` - Web framework
785
+ - `djangorestframework>=3.14.0` - API framework
786
+ - `djangorestframework-simplejwt>=5.3.0` - JWT authentication
787
+ - `drf-spectacular>=0.26.5` - API documentation
788
+ - `django-cors-headers>=4.3.1` - CORS handling
789
+ - `python-decouple>=3.8` - Environment variable management
790
+ - `psycopg2-binary>=2.9.9` - PostgreSQL adapter
791
+ - `celery>=5.3.4` - Asynchronous task queue
792
+ - `django-redis>=5.4.0` - Redis cache backend
793
+ - `redis>=5.0.1` - Redis client
794
+ - `PyJWT>=2.8.0` - JWT token handling
795
+
796
+ **CLI requirements:**
797
+ - `typer>=0.9.0` - Command-line interface framework
798
+ - `rich>=13.7.0` - Beautiful terminal output
799
+ - `docker>=7.0.0` - Container management
800
+ - `requests>=2.31.0` - HTTP client
801
+
802
+ **AI/ML requirements:**
803
+ - `numpy>=1.24.3` - Numerical computing
804
+ - `scipy>=1.11.4` - Scientific computing
805
+ - `tensorflow>=2.15.0` - Deep learning framework
806
+
807
+ ### Development Setup
808
+
809
+ For contributors and advanced users who want to run from source:
810
+
811
+ 1. **Clone and setup:**
812
+ ```bash
813
+ git clone https://github.com/AyoubArdem/ai-accelerator.git
814
+ cd ai-accelerator
815
+ python -m venv env1
816
+ source env1/bin/activate # On Windows: env1\Scripts\activate
817
+ ```
818
+
819
+ 2. **Install all dependencies:**
820
+ ```bash
821
+ pip install -r requirements.txt
822
+ pip install -r deployment/requirements.txt
823
+ pip install -r monitoring/requirements.txt
824
+ pip install -r governance/requirements.txt
825
+ ```
826
+
827
+ 3. **Database setup:**
828
+ ```bash
829
+ # For development (SQLite)
830
+ python manage.py migrate
831
+
832
+ # For production (PostgreSQL)
833
+ # Configure DATABASE_URL in .env file
834
+ python manage.py migrate
835
+ ```
836
+
837
+ 4. **Create superuser:**
838
+ ```bash
839
+ python manage.py createsuperuser
840
+ ```
841
+
842
+ ### Optional Development Dependencies
843
+
844
+ Install additional development tools:
845
+
846
+ ```bash
847
+ pip install -e ".[dev]"
848
+ ```
849
+
850
+ This includes:
851
+ - `pytest>=7.4.3` - Testing framework
852
+ - `pytest-django>=4.5.2` - Django testing utilities
853
+ - `black>=23.12.1` - Code formatting
854
+ - `flake8>=6.1.0` - Linting
855
+ - `isort>=5.13.2` - Import sorting
856
+ - `pre-commit>=3.6.0` - Git hooks
857
+
858
+ ---
859
+ ## ๏ฟฝ API Documentation
860
+
861
+ The platform provides comprehensive API documentation through **Swagger UI**, allowing you to explore and test all available endpoints interactively.
862
+
863
+ ### Accessing Swagger UI
864
+
865
+ 1. **Start the Django development server:**
866
+ ```bash
867
+ python manage.py runserver
868
+ ```
869
+
870
+ 2. **Open your browser and navigate to:**
871
+ ```
872
+ http://127.0.0.1:8000/api/schema/swagger-ui/
873
+ ```
874
+
875
+ 3. **Alternative documentation formats:**
876
+ - **Redoc UI:** `http://127.0.0.1:8000/api/schema/redoc/`
877
+ - **Raw OpenAPI Schema:** `http://127.0.0.1:8000/api/schema/`
878
+
879
+ ### What you'll find in the documentation:
880
+
881
+ * ๐Ÿ” **Interactive API Explorer** - Test endpoints directly from the browser
882
+ * ๐Ÿ“‹ **Complete endpoint listing** - All available API operations
883
+ * ๐Ÿ“ **Request/Response schemas** - Detailed data structures
884
+ * ๐Ÿ” **Authentication requirements** - JWT token usage
885
+ * ๐Ÿ“Š **Model schemas** - Data models and relationships
886
+
887
+ ### Authentication
888
+
889
+ To test protected endpoints, you'll need to:
890
+
891
+ 1. Obtain a JWT token from the authentication endpoints
892
+ 2. Click "Authorize" in Swagger UI
893
+ 3. Enter your token in the format: `Bearer <your-jwt-token>`
894
+
895
+ ---
896
+
897
+ ## ๐Ÿš€ Project Status
898
+
899
+ **AI Accelerator v0.1.0** is now available on PyPI! ๐ŸŽ‰
900
+
901
+ ### Current Status
902
+ - โœ… **Core functionality** implemented and tested
903
+ - โœ… **PyPI package** published and installable
904
+ - โœ… **CLI tool** fully functional
905
+ - โœ… **API documentation** complete
906
+ - โœ… **Docker support** for containerized deployment
907
+
908
+ ### Roadmap (Future Releases)
909
+
910
+ #### v0.2.0 - Enhanced Monitoring
911
+ - [ ] Advanced drift visualization
912
+ - [ ] Custom monitoring metrics
913
+ - [ ] Alert notification system (email/webhooks)
914
+ - [ ] Performance benchmarking tools
915
+
916
+ #### v0.3.0 - Web Dashboard
917
+ - [ ] React-based admin interface
918
+ - [ ] Real-time monitoring dashboard
919
+ - [ ] Model performance analytics
920
+ - [ ] Governance policy editor
921
+
922
+ #### v0.4.0 - Enterprise Features
923
+ - [ ] Multi-tenant architecture
924
+ - [ ] Advanced RBAC with custom roles
925
+ - [ ] Audit log export and compliance reports
926
+ - [ ] Integration with cloud platforms (AWS, GCP, Azure)
927
+
928
+ #### v0.5.0 - Automation & Pipelines
929
+ - [ ] Automated model retraining
930
+ - [ ] CI/CD pipeline integration
931
+ - [ ] A/B testing framework
932
+ - [ ] Model versioning with Git integration
933
+
934
+ ### Stability
935
+ - **Core APIs**: Stable for production use
936
+ - **CLI Interface**: Stable and backward compatible
937
+ - **Database Schema**: Stable with migration support
938
+ - **Docker Images**: Production-ready
939
+
940
+ ### Support
941
+ - ๐Ÿ’ฌ **Discussions**: [GitHub Discussions](https://github.com/AyoubArdem/AI_Accelerator/discussions)
942
+
943
+ ---
944
+
945
+ ## ๐Ÿค Contributing
946
+
947
+ We welcome contributions from the community! Here's how to get started:
948
+
949
+ ### Development Setup
950
+
951
+ ```bash
952
+ # Fork and clone the repository
953
+ git clone https://github.com/your-username/ai-accelerator.git
954
+ cd ai-accelerator
955
+
956
+ # Create virtual environment
957
+ python -m venv env1
958
+ source env1/bin/activate # On Windows: env1\Scripts\activate
959
+
960
+ # Install in development mode with dev dependencies
961
+ pip install -e ".[dev]"
962
+
963
+ # Run database migrations
964
+ python manage.py migrate
965
+
966
+ # Create a superuser
967
+ python manage.py createsuperuser
968
+
969
+ # Run tests
970
+ pytest
971
+
972
+ # Start development server
973
+ python manage.py runserver
974
+ ```
975
+
976
+ ### Code Quality
977
+
978
+ We use several tools to maintain code quality:
979
+
980
+ ```bash
981
+ # Format code
982
+ black .
983
+
984
+ # Sort imports
985
+ isort .
986
+
987
+ # Lint code
988
+ flake8 .
989
+
990
+ # Run all checks
991
+ pre-commit run --all-files
992
+ ```
993
+
994
+ ### Testing
995
+
996
+ ```bash
997
+ # Run all tests
998
+ pytest
999
+
1000
+ # Run with coverage
1001
+ pytest --cov=aiac --cov=AI_Accelerator
1002
+
1003
+ # Run specific test file
1004
+ pytest tests/test_deployment.py
1005
+ ```
1006
+
1007
+ ### Pull Request Process
1008
+
1009
+ 1. Fork the repository
1010
+ 2. Create a feature branch: `git checkout -b feature/amazing-feature`
1011
+ 3. Make your changes and add tests
1012
+ 4. Ensure all tests pass: `pytest`
1013
+ 5. Format your code: `black . && isort .`
1014
+ 6. Commit your changes: `git commit -m 'Add amazing feature'`
1015
+ 7. Push to the branch: `git push origin feature/amazing-feature`
1016
+ 8. Open a Pull Request
1017
+
1018
+ ### Areas for Contribution
1019
+
1020
+ - ๐Ÿ› **Bug fixes** - Help us squash bugs
1021
+ - โœจ **New features** - Add monitoring metrics, governance policies, etc.
1022
+ - ๐Ÿ“š **Documentation** - Improve docs, add tutorials, examples
1023
+ - ๐Ÿงช **Testing** - Add more comprehensive tests
1024
+ - ๐ŸŽจ **UI/UX** - Web dashboard, improved CLI output
1025
+ - ๐Ÿ”ง **DevOps** - Kubernetes support, CI/CD improvements
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+ ## ๐Ÿ™ Acknowledgments
1032
+
1033
+ AI Accelerator builds upon the excellent work of the open-source community:
1034
+
1035
+ - **Django** & **Django REST Framework** - Web framework foundation
1036
+ - **Typer** & **Rich** - CLI framework and beautiful output
1037
+ - **Celery** - Asynchronous task processing
1038
+ - **Docker** - Containerization platform
1039
+ - **TensorFlow** - Machine learning framework
1040
+ - **PostgreSQL** & **Redis** - Data storage and caching
1041
+
1042
+ Special thanks to all contributors and the MLOps community for inspiration and feedback.
1043
+
1044
+ ## ๐Ÿ“„ License
1045
+
1046
+ This project is licensed under the **Apache License 2.0** - see the [LICENSE](LICENSE) file for details.
1047
+
1048
+ ```
1049
+ Copyright 2026 Ayoub Ardem
1050
+
1051
+ Licensed under the Apache License, Version 2.0 (the "License");
1052
+ you may not use this file except in compliance with the License.
1053
+ You may obtain a copy of the License at
1054
+
1055
+ http://www.apache.org/licenses/LICENSE-2.0
1056
+
1057
+ Unless required by applicable law or agreed to in writing, software
1058
+ distributed under the License is distributed on an "AS IS" BASIS,
1059
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1060
+ See the License for the specific language governing permissions and
1061
+ limitations under the License.
1062
+ ```
1063
+
1064
+ ---
1065
+
1066
+ ## ๐Ÿ“ž Contact & Support
1067
+
1068
+ - **Email**: [ayoub.ardem@example.com]
1069
+ - **GitHub**: [@AyoubArdem](https://github.com/AyoubArdem)
1070
+ - **LinkedIn**: [https://www.linkedin.com/in/ayoub-student-08832b2b3]
1071
+
1072
+ ---
1073
+
1074
+ **AI Accelerator** is more than a project โ€” it's a **production-grade AI platform blueprint**.
1075
+
1076
+ > Our goal is to make AI deployment, monitoring, and governance structured, secure, and scalable โ€” from experimentation to real-world impact.
1077
+
1078
+ ๐Ÿš€ **Let's build the future of AI infrastructure together!**
1079
+