kalavai-client 0.5.4__py2.py3-none-any.whl → 0.5.6__py2.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.
@@ -1,2 +1,2 @@
1
1
 
2
- __version__ = "0.5.4"
2
+ __version__ = "0.5.6"
kalavai_client/utils.py CHANGED
@@ -2,7 +2,6 @@ import json, base64
2
2
  import os
3
3
  import requests
4
4
  from pathlib import Path
5
- from urllib.parse import urljoin
6
5
  import shutil
7
6
  import subprocess
8
7
  import re
@@ -12,10 +11,7 @@ from jinja2 import Template
12
11
 
13
12
  from rich.table import Table
14
13
  import yaml
15
- import platform
16
- import psutil
17
14
 
18
- import GPUtil
19
15
 
20
16
  from kalavai_client.auth import KalavaiAuthClient
21
17
 
@@ -387,41 +383,6 @@ def encode_dict(data: dict):
387
383
  def decode_dict(str_data: str):
388
384
  return json.loads(base64.b64decode(str_data.encode()))
389
385
 
390
- def get_gpus():
391
- GPUs = GPUtil.getGPUs()
392
- gpus = []
393
- for gpu in GPUs:
394
- name = "nvidia" if "nvidia" in gpu.name.lower() else None
395
- if name is None:
396
- continue
397
- mem = int(gpu.memoryTotal / 1000) # in GBs
398
- gpus.append(f"{name}-{mem}GB")
399
- return ",".join(gpus)
400
-
401
- def system_uptick_request(username, node_name, backend_endpoint, backend_api_key, local_version=0):
402
- gpus = get_gpus()
403
- data = {
404
- "username": username,
405
- "system_info": {
406
- "os": platform.system(),
407
- "cpu_count": os.cpu_count(),
408
- "cpu": platform.processor(),
409
- "platform": platform.platform(),
410
- "ram": round(psutil.virtual_memory().total / (1024.0 **3)),
411
- "hostname": node_name,
412
- "gpus": gpus
413
- },
414
- "version": local_version
415
- }
416
-
417
- response = requests.post(
418
- url=urljoin(backend_endpoint, "/uptick"),
419
- json=data,
420
- headers={'X-API-KEY': backend_api_key}
421
- )
422
- response.raise_for_status()
423
- return response.json()
424
-
425
386
  def resource_path(relative_path: str):
426
387
  """ Get absolute path to resource """
427
388
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kalavai-client
3
- Version: 0.5.4
3
+ Version: 0.5.6
4
4
  Summary: Client app for kalavai platform
5
5
  License: Apache-2.0
6
6
  Keywords: LLM,platform
@@ -26,7 +26,6 @@ Requires-Dist: Pillow (==10.3.0)
26
26
  Requires-Dist: anvil-uplink (==0.5.1)
27
27
  Requires-Dist: arguably (>=1.2.5)
28
28
  Requires-Dist: build ; extra == "dev"
29
- Requires-Dist: gputil (==1.4.0)
30
29
  Requires-Dist: importlib_resources (==6.5.2)
31
30
  Requires-Dist: jinja2 (==3.1.4)
32
31
  Requires-Dist: netifaces (==0.11.0)
@@ -36,7 +35,7 @@ Requires-Dist: pyinstaller (==6.5.0) ; extra == "dev"
36
35
  Requires-Dist: pyyaml (==6.0.2)
37
36
  Requires-Dist: requests (>=2.25)
38
37
  Requires-Dist: rich (==13.7.1)
39
- Requires-Dist: setuptools (<70.0.0)
38
+ Requires-Dist: setuptools (>70.0.0)
40
39
  Requires-Dist: twine ; extra == "dev"
41
40
  Project-URL: Homepage, https://platform.kalavai.net
42
41
  Project-URL: Website, https://kalavai.net
@@ -51,7 +50,7 @@ Description-Content-Type: text/markdown
51
50
 
52
51
  </div>
53
52
 
54
- ⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [staring our GitHub project](https://github.com/kalavai-net/kalavai-client), joining our [discord channel](https://discord.gg/HJ8FNapQ), follow our [Substack](https://kalavainet.substack.com/) and give us a [review on Product Hunt](https://www.producthunt.com/products/kalavai/reviews/new).**
53
+ ⭐⭐⭐ **Kalavai and our LLM pools are open source, and free to use in both commercial and non-commercial purposes. If you find it useful, consider supporting us by [giving a star to our GitHub project](https://github.com/kalavai-net/kalavai-client), joining our [discord channel](https://discord.gg/HJ8FNapQ), follow our [Substack](https://kalavainet.substack.com/) and give us a [review on Product Hunt](https://www.producthunt.com/products/kalavai/reviews/new).**
55
54
 
56
55
 
57
56
  # Kalavai: turn your devices into a scalable LLM platform
@@ -145,6 +144,18 @@ From release **v0.5.0, you can now install `kalavai` client in non-worker comput
145
144
 
146
145
  - Python 3.10+
147
146
 
147
+ If you see the following error:
148
+
149
+ ```bash
150
+ fatal error: Python.h: No such file or directory | #include <Python.h>
151
+ ```
152
+
153
+ Make sure you also install python3-dev package. For ubuntu distros:
154
+
155
+ ```bash
156
+ sudo apt install python3-dev
157
+ ```
158
+
148
159
 
149
160
  ### Install the client
150
161
 
@@ -257,7 +268,10 @@ Anything missing here? Give us a shout in the [discussion board](https://github.
257
268
  Python version <= 3.12.
258
269
 
259
270
  ```bash
260
- virtualenv -p python3 env
271
+ sudo add-apt-repository ppa:deadsnakes/ppa
272
+ sudo apt update
273
+ sudo apt install python3.10 python3.10-dev
274
+ virtualenv -p python3.10 env
261
275
  source env/bin/activate
262
276
  sudo apt install python3.10-venv python3.10-dev -y
263
277
  pip install -e .[dev]
@@ -277,3 +291,4 @@ To run the unit tests, use:
277
291
  python -m unittest
278
292
  ```
279
293
 
294
+
@@ -1,4 +1,4 @@
1
- kalavai_client/__init__.py,sha256=0nK0R2brtTvPHg-XX-uX9XmboomeSzoeiiyh-pVS8k4,22
1
+ kalavai_client/__init__.py,sha256=WmsCPmXrdvnKQI5RRjPdrh0vBH03TfvNWsCeTKiTI00,22
2
2
  kalavai_client/__main__.py,sha256=WQUfxvRsBJH5gsCJg8pLz95QnZIj7Ol8psTO77m0QE0,73
3
3
  kalavai_client/assets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  kalavai_client/assets/apps.yaml,sha256=aW9wKyvZhZFMHzBkZOsgVq-kpntED6U8B9XoHkm5F9Y,5963
@@ -12,9 +12,9 @@ kalavai_client/assets/vpn-template.yaml,sha256=Hm7sevtrsakSxSKMJwl68hzOEWCaxwYyt
12
12
  kalavai_client/auth.py,sha256=QsBh28L2LwjBBK6pTUE4Xu36lLDTyetyU1YfS1Hbb6g,1717
13
13
  kalavai_client/cli.py,sha256=qBOe4IULIX7pzKUhHoR1JppWrbUeV1aslxQLMWrRGpU,67913
14
14
  kalavai_client/cluster.py,sha256=C7uofrpSEj4PUhF_VLfwH4k9BhJMTkuKRWHxDYu1OD0,11345
15
- kalavai_client/utils.py,sha256=XO-fTrl8vudAOYK9QwuR-C5enzXORIs5A4sFIk3eA9k,13476
16
- kalavai_client-0.5.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
- kalavai_client-0.5.4.dist-info/METADATA,sha256=hwPYr80EYyA_HZ9sYVfCZtNG9KgCYu33QLT19hiz-sI,12273
18
- kalavai_client-0.5.4.dist-info/WHEEL,sha256=_GR1VF9XYsw6EE9ATkyto4e6vRiOUBshR1STiZ5m1gE,92
19
- kalavai_client-0.5.4.dist-info/entry_points.txt,sha256=9T6D45gxwzfVbglMm1r6XPdXuuZdHfy_7fCeu2jUphc,50
20
- kalavai_client-0.5.4.dist-info/RECORD,,
15
+ kalavai_client/utils.py,sha256=aHgNj5iVOhgTrI-UFoqgAvnesn4t6Qos3-WnNSxZ-fc,12342
16
+ kalavai_client-0.5.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
+ kalavai_client-0.5.6.dist-info/METADATA,sha256=Veuq2Ml2gG7k006pxNZ41u0akLCg-MzhS7yF632gYcs,12584
18
+ kalavai_client-0.5.6.dist-info/WHEEL,sha256=_GR1VF9XYsw6EE9ATkyto4e6vRiOUBshR1STiZ5m1gE,92
19
+ kalavai_client-0.5.6.dist-info/entry_points.txt,sha256=9T6D45gxwzfVbglMm1r6XPdXuuZdHfy_7fCeu2jUphc,50
20
+ kalavai_client-0.5.6.dist-info/RECORD,,