lemonade-sdk 8.0.1__py3-none-any.whl → 8.0.2__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.

Potentially problematic release.


This version of lemonade-sdk might be problematic. Click here for more details.

@@ -7,6 +7,7 @@ from tabulate import tabulate
7
7
  import lemonade.common.build as build
8
8
  import lemonade.common.filesystem as fs
9
9
  from lemonade.cache import Keys
10
+ from lemonade.tools.accuracy import LMEvalHarness
10
11
  from lemonade.tools.huggingface.bench import HuggingfaceBench
11
12
  from lemonade.tools.llamacpp.bench import LlamaCppBench
12
13
  from lemonade.tools.mmlu import AccuracyMMLU
@@ -527,6 +528,14 @@ class LemonadePerfTable(Table):
527
528
  ".2f",
528
529
  )
529
530
  ],
531
+ LMEvalHarness: [
532
+ AdditionalStat(
533
+ "EleutherAI\nLM Evaluation",
534
+ "^lm_eval_",
535
+ "^lm_eval_",
536
+ ".1f",
537
+ )
538
+ ],
530
539
  },
531
540
  "last_columns": [
532
541
  SimpleStat(
@@ -266,7 +266,7 @@ class LemonadeTray(SystemTray):
266
266
  self.logger.error(f"Error changing port: {str(e)}")
267
267
  self.show_balloon_notification("Error", f"Failed to change port: {str(e)}")
268
268
 
269
- def upgrade_to_latest(self, icon, item):
269
+ def upgrade_to_latest(self, _, __):
270
270
  """
271
271
  Download and launch the Lemonade Server installer
272
272
  """
@@ -281,21 +281,34 @@ class LemonadeTray(SystemTray):
281
281
  installer_path = os.path.join(
282
282
  tempfile.gettempdir(), "Lemonade_Server_Installer.exe"
283
283
  )
284
+ if os.path.exists(installer_path):
285
+ os.remove(installer_path)
284
286
 
285
287
  # Download the installer
286
288
  response = requests.get(self.latest_version_url, stream=True)
287
289
  response.raise_for_status()
288
290
 
289
- # Save the installer to disk
291
+ # Save the installer to disk and force write to disk
290
292
  with open(installer_path, "wb") as f:
291
293
  for chunk in response.iter_content(chunk_size=8192):
292
294
  f.write(chunk)
295
+ f.flush()
296
+ os.fsync(f.fileno())
293
297
 
294
- # Launch the installer
295
- subprocess.Popen([installer_path], shell=True)
298
+ # Launch the installer as a completely detached process
299
+ # subprocess.DETACHED_PROCESS - Creates a process that's not attached to the console
300
+ # subprocess.CREATE_NEW_PROCESS_GROUP - Creates a new process group
301
+ # close_fds=True - Closes file descriptors to prevent inheritance
302
+ subprocess.Popen(
303
+ [installer_path],
304
+ creationflags=subprocess.DETACHED_PROCESS
305
+ | subprocess.CREATE_NEW_PROCESS_GROUP,
306
+ close_fds=True,
307
+ shell=True,
308
+ cwd=tempfile.gettempdir(),
309
+ )
296
310
 
297
- # Quit the application
298
- self.exit_app(icon, item)
311
+ # No need to quit the application, the installer will handle it
299
312
 
300
313
  def create_menu(self):
301
314
  """
lemonade/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "8.0.1"
1
+ __version__ = "8.0.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lemonade-sdk
3
- Version: 8.0.1
3
+ Version: 8.0.2
4
4
  Summary: Lemonade SDK: Your LLM Aide for Validation and Deployment
5
5
  Author-email: lemonade@amd.com
6
6
  Requires-Python: >=3.10, <3.12
@@ -4,7 +4,7 @@ lemonade/cache.py,sha256=djr2qgyUUAWlQv8FehU9qlNtCwK0IZqo82hcBDyZ3-A,2850
4
4
  lemonade/cli.py,sha256=XzptHh6LTl5OdGRnxiLykQ8QBl2rQmhWH5w0KPJVyY4,4359
5
5
  lemonade/sequence.py,sha256=KSH7BPsiyDKsOsg_ziQKEGsDwMmuO_YbgPRBxkZd0pw,13267
6
6
  lemonade/state.py,sha256=sdSezla7Cd7KYL90xY3p9kcNV4ndSyN6UvNLOr3vBMA,5261
7
- lemonade/version.py,sha256=qR-61NMOca8p2Rty8s6xwXQSXLDufw2os6i4zdyqfak,22
7
+ lemonade/version.py,sha256=hTIZ_8cc-ggqcFeOYQQKOHudFQCQNQlM4ZltuYIIjD4,22
8
8
  lemonade/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  lemonade/common/build.py,sha256=zTb0m1-kuUx6zw5QHp2SNnVuN6jOTMQ2FCdj9iH374U,6140
10
10
  lemonade/common/cli_helpers.py,sha256=hjBfXrTtFl8gmCFlL-ksviXR0mOcdPtTWVNKoEp3PG4,4993
@@ -42,12 +42,12 @@ lemonade/tools/quark/quark_load.py,sha256=tNy-G9yEJ5cTsxw9LmGUYmmdlEzMo_iy-KSIc2
42
42
  lemonade/tools/quark/quark_quantize.py,sha256=LZrcbLf9oIw7FW2ccP_qkCP32jxmz5YnNEaoY6rsAuY,16583
43
43
  lemonade/tools/report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  lemonade/tools/report/llm_report.py,sha256=bVHhwCINA-Ok2EdSwAsLubsc83N3KWOVuwTguw7jDcE,6676
45
- lemonade/tools/report/table.py,sha256=di8IZkolt_kaZfWri6GQkhPE1zCELqcrBcG1x1fzWqg,24843
45
+ lemonade/tools/report/table.py,sha256=VkTv5Vd0HOXudEthCBnFMrWK73Dm2AQP2_B83vEKBzI,25129
46
46
  lemonade/tools/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  lemonade/tools/server/llamacpp.py,sha256=aDVjjkU2Z2PN25Uuy-lk6ByKPR8kg5r2X-YsVSs4vi8,15624
48
48
  lemonade/tools/server/serve.py,sha256=3_jBpi6THnnAmtKOxvPlOkIhSTTmrlZE3fr2Dpto-Q4,52794
49
49
  lemonade/tools/server/tool_calls.py,sha256=xrAlQwKG-nv2xLlf8f9CDSaUbyMn8ZtHkds9iZLG9K8,5230
50
- lemonade/tools/server/tray.py,sha256=SakwhZKPgo7VtWP4q10SaCcZdxKG95dnNsXdTu9Eei0,16030
50
+ lemonade/tools/server/tray.py,sha256=OI2uCncs8UgnYFLCKHHXq06RETO2RFEcn4xLzMq-q_c,16675
51
51
  lemonade/tools/server/webapp.py,sha256=8Das5yXOaSBLZmSZ_eddJajQFxBhvl5D6GI_hHlGbE0,1040
52
52
  lemonade/tools/server/static/favicon.ico,sha256=hMmP9qGJNeZ0mFS86JIqPbZstXMZn0Z76_HfHQpREAU,126745
53
53
  lemonade/tools/server/static/styles.css,sha256=u-SzZ-vh5qEFMDSKLHJ7MsQwvwpJLB_DdJxocf06Sro,16880
@@ -57,14 +57,14 @@ lemonade/tools/server/utils/system_tray.py,sha256=b9lvNv9chJKQxvmH7qzAuUe6H9HsLu
57
57
  lemonade/tools/server/utils/thread.py,sha256=pK9K_6DNWoQ78NArkAX3Ym2WsxLnCs9sKTk6TitlYnI,2804
58
58
  lemonade_install/__init__.py,sha256=26zohKg2jgr_5y7tObduWMYQg8zCTWMZHL8lfi2zZVQ,40
59
59
  lemonade_install/install.py,sha256=DJWR36QSjZtvEwRjYPNSjhYgoxLjI_6OPrCMZjL0ChY,28263
60
- lemonade_sdk-8.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
61
- lemonade_sdk-8.0.1.dist-info/licenses/NOTICE.md,sha256=B8lEqi4QE41J9ljz4Riv2JgHD1v8GCZE6nNBHO3KIA0,2135
62
- lemonade_server/cli.py,sha256=fm1eORLKElHfzqO5VVicDmn9EbmqIffi1bynqacJeyw,11744
60
+ lemonade_sdk-8.0.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
61
+ lemonade_sdk-8.0.2.dist-info/licenses/NOTICE.md,sha256=B8lEqi4QE41J9ljz4Riv2JgHD1v8GCZE6nNBHO3KIA0,2135
62
+ lemonade_server/cli.py,sha256=z6ojwFaOIz0hbUbVtZWMLP4YDpkcVOmqwmdm55dhKA4,11980
63
63
  lemonade_server/model_manager.py,sha256=HqbahDMRv1x8jyQj4pa1rXanlPmcCykt8tlI6WfaxjE,13023
64
- lemonade_server/pydantic_models.py,sha256=2ALw47C1VWGe2nKWjlEAzP1ggKYsky4xlahUFxQJCMs,2298
64
+ lemonade_server/pydantic_models.py,sha256=nsbpHqAkd6nkz5QT16u9xMZbCXqccGiy5O0fWecOM88,2338
65
65
  lemonade_server/server_models.json,sha256=wTK_H9XDHLxqMWQJqbBsJwm50PhOR4gURyVj9Jm35PQ,6992
66
- lemonade_sdk-8.0.1.dist-info/METADATA,sha256=s5q-KKS3Drrxxm1-wGLUP9c0HymN2RgC7PjMqr0biog,8225
67
- lemonade_sdk-8.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
- lemonade_sdk-8.0.1.dist-info/entry_points.txt,sha256=gJppn0ETtXXR6ceKWEIRdk42kMC7ps59EmU3NCPyPUk,144
69
- lemonade_sdk-8.0.1.dist-info/top_level.txt,sha256=10ap5GNiPhalO4V50LRoxA1FqRT9g3Xkia6BITu880k,42
70
- lemonade_sdk-8.0.1.dist-info/RECORD,,
66
+ lemonade_sdk-8.0.2.dist-info/METADATA,sha256=hS5Xn5Pjq0RbdLlhedz3HQMCvkRrMWFoAI0Mao4cHwg,8225
67
+ lemonade_sdk-8.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
68
+ lemonade_sdk-8.0.2.dist-info/entry_points.txt,sha256=gJppn0ETtXXR6ceKWEIRdk42kMC7ps59EmU3NCPyPUk,144
69
+ lemonade_sdk-8.0.2.dist-info/top_level.txt,sha256=10ap5GNiPhalO4V50LRoxA1FqRT9g3Xkia6BITu880k,42
70
+ lemonade_sdk-8.0.2.dist-info/RECORD,,
lemonade_server/cli.py CHANGED
@@ -4,7 +4,6 @@ import os
4
4
  from typing import Tuple, Optional
5
5
  import psutil
6
6
  from typing import List
7
- import subprocess
8
7
 
9
8
 
10
9
  # Error codes for different CLI scenarios
@@ -88,23 +87,26 @@ def stop():
88
87
  # Terminate the main process first
89
88
  process.terminate()
90
89
 
91
- # Then terminate all children
90
+ # Then terminate llama-server child process (known to be stubborn)
91
+ # We avoid killing other child processes, such as the installer
92
92
  for child in children:
93
- try:
94
- child.terminate()
95
- except psutil.NoSuchProcess:
96
- pass # Child already terminated
93
+ if "llama-server" in child.name():
94
+ try:
95
+ child.terminate()
96
+ except psutil.NoSuchProcess:
97
+ pass # Child already terminated
97
98
 
98
99
  # Wait for main process
99
100
  process.wait(timeout=10)
100
101
 
101
- # Kill any children that didn't terminate gracefully
102
+ # Kill llama-server child process if it didn't terminate gracefully
102
103
  for child in children:
103
- try:
104
- if child.is_running():
105
- child.kill()
106
- except psutil.NoSuchProcess:
107
- pass # Child already terminated
104
+ if "llama-server" in child.name():
105
+ try:
106
+ if child.is_running():
107
+ child.kill()
108
+ except psutil.NoSuchProcess:
109
+ pass # Child already terminated
108
110
  except psutil.NoSuchProcess:
109
111
  # Process already terminated
110
112
  pass
@@ -62,6 +62,7 @@ class ChatCompletionRequest(BaseModel):
62
62
  tools: list[dict] | None = None
63
63
  max_tokens: int | None = None
64
64
  max_completion_tokens: int | None = None
65
+ response_format: dict | None = None
65
66
 
66
67
 
67
68
  class ResponsesRequest(BaseModel):