konduktor-nightly 0.1.0.dev20251128104812__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.
Files changed (107) hide show
  1. konduktor/__init__.py +49 -0
  2. konduktor/adaptors/__init__.py +0 -0
  3. konduktor/adaptors/aws.py +221 -0
  4. konduktor/adaptors/common.py +118 -0
  5. konduktor/adaptors/gcp.py +126 -0
  6. konduktor/authentication.py +124 -0
  7. konduktor/backends/__init__.py +6 -0
  8. konduktor/backends/backend.py +86 -0
  9. konduktor/backends/constants.py +21 -0
  10. konduktor/backends/deployment.py +204 -0
  11. konduktor/backends/deployment_utils.py +1351 -0
  12. konduktor/backends/jobset.py +225 -0
  13. konduktor/backends/jobset_utils.py +726 -0
  14. konduktor/backends/pod_utils.py +501 -0
  15. konduktor/check.py +184 -0
  16. konduktor/cli.py +1945 -0
  17. konduktor/config.py +420 -0
  18. konduktor/constants.py +36 -0
  19. konduktor/controller/__init__.py +0 -0
  20. konduktor/controller/constants.py +56 -0
  21. konduktor/controller/launch.py +44 -0
  22. konduktor/controller/node.py +116 -0
  23. konduktor/controller/parse.py +111 -0
  24. konduktor/dashboard/README.md +30 -0
  25. konduktor/dashboard/backend/main.py +169 -0
  26. konduktor/dashboard/backend/sockets.py +154 -0
  27. konduktor/dashboard/frontend/.eslintrc.json +3 -0
  28. konduktor/dashboard/frontend/.gitignore +36 -0
  29. konduktor/dashboard/frontend/app/api/jobs/route.js +71 -0
  30. konduktor/dashboard/frontend/app/api/namespaces/route.js +69 -0
  31. konduktor/dashboard/frontend/app/components/Grafana.jsx +66 -0
  32. konduktor/dashboard/frontend/app/components/JobsData.jsx +197 -0
  33. konduktor/dashboard/frontend/app/components/LogsData.jsx +139 -0
  34. konduktor/dashboard/frontend/app/components/NavMenu.jsx +39 -0
  35. konduktor/dashboard/frontend/app/components/NavTabs.jsx +73 -0
  36. konduktor/dashboard/frontend/app/components/NavTabs2.jsx +30 -0
  37. konduktor/dashboard/frontend/app/components/SelectBtn.jsx +27 -0
  38. konduktor/dashboard/frontend/app/components/lib/utils.js +6 -0
  39. konduktor/dashboard/frontend/app/components/ui/chip-select.jsx +78 -0
  40. konduktor/dashboard/frontend/app/components/ui/input.jsx +19 -0
  41. konduktor/dashboard/frontend/app/components/ui/navigation-menu.jsx +104 -0
  42. konduktor/dashboard/frontend/app/components/ui/select.jsx +120 -0
  43. konduktor/dashboard/frontend/app/favicon.ico +0 -0
  44. konduktor/dashboard/frontend/app/globals.css +120 -0
  45. konduktor/dashboard/frontend/app/jobs/page.js +10 -0
  46. konduktor/dashboard/frontend/app/layout.js +22 -0
  47. konduktor/dashboard/frontend/app/logs/page.js +11 -0
  48. konduktor/dashboard/frontend/app/page.js +12 -0
  49. konduktor/dashboard/frontend/jsconfig.json +7 -0
  50. konduktor/dashboard/frontend/next.config.mjs +4 -0
  51. konduktor/dashboard/frontend/package-lock.json +6687 -0
  52. konduktor/dashboard/frontend/package.json +37 -0
  53. konduktor/dashboard/frontend/postcss.config.mjs +8 -0
  54. konduktor/dashboard/frontend/server.js +64 -0
  55. konduktor/dashboard/frontend/tailwind.config.js +17 -0
  56. konduktor/data/__init__.py +9 -0
  57. konduktor/data/aws/__init__.py +15 -0
  58. konduktor/data/aws/s3.py +1138 -0
  59. konduktor/data/constants.py +7 -0
  60. konduktor/data/data_utils.py +268 -0
  61. konduktor/data/gcp/__init__.py +19 -0
  62. konduktor/data/gcp/constants.py +42 -0
  63. konduktor/data/gcp/gcs.py +994 -0
  64. konduktor/data/gcp/utils.py +9 -0
  65. konduktor/data/registry.py +19 -0
  66. konduktor/data/storage.py +812 -0
  67. konduktor/data/storage_utils.py +535 -0
  68. konduktor/execution.py +447 -0
  69. konduktor/kube_client.py +237 -0
  70. konduktor/logging.py +111 -0
  71. konduktor/manifests/aibrix-setup.yaml +430 -0
  72. konduktor/manifests/apoxy-setup.yaml +184 -0
  73. konduktor/manifests/apoxy-setup2.yaml +98 -0
  74. konduktor/manifests/controller_deployment.yaml +69 -0
  75. konduktor/manifests/dashboard_deployment.yaml +131 -0
  76. konduktor/manifests/dmesg_daemonset.yaml +57 -0
  77. konduktor/manifests/pod_cleanup_controller.yaml +129 -0
  78. konduktor/resource.py +546 -0
  79. konduktor/serving.py +153 -0
  80. konduktor/task.py +949 -0
  81. konduktor/templates/deployment.yaml.j2 +191 -0
  82. konduktor/templates/jobset.yaml.j2 +43 -0
  83. konduktor/templates/pod.yaml.j2 +563 -0
  84. konduktor/usage/__init__.py +0 -0
  85. konduktor/usage/constants.py +21 -0
  86. konduktor/utils/__init__.py +0 -0
  87. konduktor/utils/accelerator_registry.py +17 -0
  88. konduktor/utils/annotations.py +62 -0
  89. konduktor/utils/base64_utils.py +95 -0
  90. konduktor/utils/common_utils.py +426 -0
  91. konduktor/utils/constants.py +5 -0
  92. konduktor/utils/env_options.py +55 -0
  93. konduktor/utils/exceptions.py +234 -0
  94. konduktor/utils/kubernetes_enums.py +8 -0
  95. konduktor/utils/kubernetes_utils.py +763 -0
  96. konduktor/utils/log_utils.py +467 -0
  97. konduktor/utils/loki_utils.py +102 -0
  98. konduktor/utils/rich_utils.py +123 -0
  99. konduktor/utils/schemas.py +625 -0
  100. konduktor/utils/subprocess_utils.py +273 -0
  101. konduktor/utils/ux_utils.py +247 -0
  102. konduktor/utils/validator.py +461 -0
  103. konduktor_nightly-0.1.0.dev20251128104812.dist-info/LICENSE +91 -0
  104. konduktor_nightly-0.1.0.dev20251128104812.dist-info/METADATA +98 -0
  105. konduktor_nightly-0.1.0.dev20251128104812.dist-info/RECORD +107 -0
  106. konduktor_nightly-0.1.0.dev20251128104812.dist-info/WHEEL +4 -0
  107. konduktor_nightly-0.1.0.dev20251128104812.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "frontend",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "NODE_ENV=development node server.js",
7
+ "build": "NODE_ENV=production next build",
8
+ "start": "NODE_ENV=production node server.js",
9
+ "lint": "next lint"
10
+ },
11
+ "dependencies": {
12
+ "@emotion/react": "^11.13.3",
13
+ "@emotion/styled": "^11.13.0",
14
+ "@mui/icons-material": "^6.1.2",
15
+ "@mui/material": "^6.1.2",
16
+ "@mui/x-data-grid": "^7.19.0",
17
+ "@radix-ui/react-navigation-menu": "^1.2.1",
18
+ "@radix-ui/react-select": "^2.1.2",
19
+ "@radix-ui/react-slot": "^1.1.0",
20
+ "class-variance-authority": "^0.7.0",
21
+ "next": "14.2.14",
22
+ "react": "^18",
23
+ "react-dom": "^18",
24
+ "react-icons": "^5.3.0",
25
+ "react-spinners": "^0.14.1",
26
+ "socket.io": "^4.8.0",
27
+ "socket.io-client": "^4.8.0",
28
+ "tailwind-merge": "^2.5.3",
29
+ "tailwindcss-animate": "^1.0.7"
30
+ },
31
+ "devDependencies": {
32
+ "eslint": "^8",
33
+ "eslint-config-next": "14.2.14",
34
+ "postcss": "^8",
35
+ "tailwindcss": "^3.4.1"
36
+ }
37
+ }
@@ -0,0 +1,8 @@
1
+ /** @type {import('postcss-load-config').Config} */
2
+ const config = {
3
+ plugins: {
4
+ tailwindcss: {},
5
+ },
6
+ };
7
+
8
+ export default config;
@@ -0,0 +1,64 @@
1
+ const { createServer } = require('http');
2
+ const next = require('next');
3
+ const { Server: SocketIOServer } = require('socket.io');
4
+ const ClientIO = require('socket.io-client');
5
+
6
+
7
+ const dev = process.env.NODE_ENV !== 'production';
8
+ const hostname = '127.0.0.1';
9
+ const port = 5173;
10
+ const app = next({ dev, hostname, port });
11
+ const handle = app.getRequestHandler();
12
+
13
+
14
+ app.prepare().then(() => {
15
+ const httpServer = createServer((req, res) => {
16
+ handle(req, res);
17
+ });
18
+
19
+ const io = new SocketIOServer(httpServer, {
20
+ cors: {
21
+ origin: "*",
22
+ },
23
+ });
24
+
25
+ // Connect to Flask backend only when there are clients connected
26
+ let activeClients = 0;
27
+ let fastapiSocket;
28
+
29
+ io.on('connection', (clientSocket) => {
30
+ activeClients += 1;
31
+
32
+ // Establish a connection to Flask only if this is the first client
33
+ if (activeClients === 1) {
34
+ const backendUrl = process.env.NODE_ENV === 'development'
35
+ ? 'http://127.0.0.1:5001'
36
+ : 'http://backend.konduktor-dashboard.svc.cluster.local:5001';
37
+
38
+ fastapiSocket = ClientIO(backendUrl);
39
+
40
+ fastapiSocket.on('log_data', (data) => {
41
+ io.emit('log_data', data); // Broadcast to all connected clients
42
+ });
43
+
44
+ // Receive updated namespaces from the client (forward to Flask)
45
+ clientSocket.on('update_namespaces', (namespaces) => {
46
+ fastapiSocket.emit('update_namespaces', namespaces); // Send to Flask
47
+ });
48
+ }
49
+
50
+ clientSocket.on('disconnect', () => {
51
+ activeClients -= 1;
52
+
53
+ // Disconnect from Flask when no clients are connected
54
+ if (activeClients === 0 && fastapiSocket) {
55
+ fastapiSocket.disconnect();
56
+ fastapiSocket = null;
57
+ }
58
+ });
59
+ });
60
+
61
+ httpServer.listen(port, () => {
62
+ console.log(`> Ready on http://${hostname}:${port}`);
63
+ });
64
+ });
@@ -0,0 +1,17 @@
1
+ /** @type {import('tailwindcss').Config} */
2
+ module.exports = {
3
+ content: [
4
+ "./pages/**/*.{js,ts,jsx,tsx,mdx}",
5
+ "./components/**/*.{js,ts,jsx,tsx,mdx}",
6
+ "./app/**/*.{js,ts,jsx,tsx,mdx}",
7
+ ],
8
+ theme: {
9
+ extend: {
10
+ colors: {
11
+ background: "var(--background)",
12
+ foreground: "var(--foreground)",
13
+ },
14
+ },
15
+ },
16
+ plugins: [],
17
+ };
@@ -0,0 +1,9 @@
1
+ """Data sync between workstation <--> blob (s3, gcs, etc.) <--> worker pods"""
2
+
3
+ from konduktor.data.storage import Storage, StorageMode, StoreType
4
+
5
+ __all__ = [
6
+ 'Storage',
7
+ 'StorageMode',
8
+ 'StoreType',
9
+ ]
@@ -0,0 +1,15 @@
1
+ """Data sync between workstation <--> blob (s3, gcs, etc.) <--> worker pods"""
2
+
3
+ from konduktor.data.aws.s3 import (
4
+ DEFAULT_AWS_CONFIG_PATH,
5
+ DEFAULT_AWS_CREDENTIAL_PATH,
6
+ S3CloudStorage,
7
+ S3Store,
8
+ )
9
+
10
+ __all__ = [
11
+ 'S3Store',
12
+ 'S3CloudStorage',
13
+ 'DEFAULT_AWS_CREDENTIAL_PATH',
14
+ 'DEFAULT_AWS_CONFIG_PATH',
15
+ ]