kalavai-client 0.5.4__py2.py3-none-any.whl → 0.5.5__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.5"
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.5
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,6 @@ 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)
40
38
  Requires-Dist: twine ; extra == "dev"
41
39
  Project-URL: Homepage, https://platform.kalavai.net
42
40
  Project-URL: Website, https://kalavai.net
@@ -145,6 +143,18 @@ From release **v0.5.0, you can now install `kalavai` client in non-worker comput
145
143
 
146
144
  - Python 3.10+
147
145
 
146
+ If you see the following error:
147
+
148
+ ```bash
149
+ fatal error: Python.h: No such file or directory | #include <Python.h>
150
+ ```
151
+
152
+ Make sure you also install python3-dev package. For ubuntu distros:
153
+
154
+ ```bash
155
+ sudo apt install python3-dev
156
+ ```
157
+
148
158
 
149
159
  ### Install the client
150
160
 
@@ -1,4 +1,4 @@
1
- kalavai_client/__init__.py,sha256=0nK0R2brtTvPHg-XX-uX9XmboomeSzoeiiyh-pVS8k4,22
1
+ kalavai_client/__init__.py,sha256=MTrd27NxgrOwTGro0-JhbtsRXL3YhRVM4TuYTQBUXAQ,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.5.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
17
+ kalavai_client-0.5.5.dist-info/METADATA,sha256=TDAB1on1aUOW0xjiKhrSOhHlUMxL0wy2V2pJXQE6PS4,12433
18
+ kalavai_client-0.5.5.dist-info/WHEEL,sha256=_GR1VF9XYsw6EE9ATkyto4e6vRiOUBshR1STiZ5m1gE,92
19
+ kalavai_client-0.5.5.dist-info/entry_points.txt,sha256=9T6D45gxwzfVbglMm1r6XPdXuuZdHfy_7fCeu2jUphc,50
20
+ kalavai_client-0.5.5.dist-info/RECORD,,