bohr-agent-sdk 0.1.119__py3-none-any.whl → 0.1.120__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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bohr-agent-sdk
3
- Version: 0.1.119
3
+ Version: 0.1.120
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -62,7 +62,7 @@ dp/agent/device/device/__init__.py,sha256=w7_1S16S1vWUq0RGl0GFgjq2vFkc5oNvy8cQTn
62
62
  dp/agent/device/device/device.py,sha256=9ZRIJth-4qMO-i-u_b_cO3d6a4eTbTQjPaxFsV_zEkc,9643
63
63
  dp/agent/device/device/types.py,sha256=JuxB-hjf1CjjvfBxCLwRAXVFlYS-nPEdiJpBWLFVCzo,1924
64
64
  dp/agent/server/__init__.py,sha256=rckaYd8pbYyB4ENEhgjXKeGMXjdnrgcJpdM1gu5u1Wc,508
65
- dp/agent/server/calculation_mcp_server.py,sha256=Nq1lv-H1E8J1yNz85TCbl1GtSQXQGZfAIB1qKajZcNY,19664
65
+ dp/agent/server/calculation_mcp_server.py,sha256=Ax3vZbJbU4o66tRRS4R_IGcSrMmXAj9fskl-V5tgrKA,19464
66
66
  dp/agent/server/preprocessor.py,sha256=XUWu7QOwo_sIDMYS2b1OTrM33EXEVH_73vk-ju1Ok8A,1264
67
67
  dp/agent/server/utils.py,sha256=cIKaAg8UaP5yMwvIVTgUVBjy-B3S16bEdnucUf4UDIM,2055
68
68
  dp/agent/server/executor/__init__.py,sha256=s95M5qKQk39Yi9qaVJZhk_nfj54quSf7EDghR3OCFUA,248
@@ -75,8 +75,8 @@ dp/agent/server/storage/bohrium_storage.py,sha256=EsKX4dWWvZTn2TEhZv4zsvihfDK0mm
75
75
  dp/agent/server/storage/http_storage.py,sha256=KiySq7g9-iJr12XQCKKyJLn8wJoDnSRpQAR5_qPJ1ZU,1471
76
76
  dp/agent/server/storage/local_storage.py,sha256=t1wfjByjXew9ws3PuUxWxmZQ0-Wt1a6t4wmj3fW62GI,1352
77
77
  dp/agent/server/storage/oss_storage.py,sha256=pgjmi7Gir3Y5wkMDCvU4fvSls15fXT7Ax-h9MYHFPK0,3359
78
- bohr_agent_sdk-0.1.119.dist-info/METADATA,sha256=oG4bst9eor1ytVutI5UGppqY8aJ-C9c12jKOGBoHh2g,11070
79
- bohr_agent_sdk-0.1.119.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
80
- bohr_agent_sdk-0.1.119.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
- bohr_agent_sdk-0.1.119.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
- bohr_agent_sdk-0.1.119.dist-info/RECORD,,
78
+ bohr_agent_sdk-0.1.120.dist-info/METADATA,sha256=GBYxEWv13ktFJwnVq8yXqNFTVeHRhlxZdC2nBlecdsw,11070
79
+ bohr_agent_sdk-0.1.120.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
80
+ bohr_agent_sdk-0.1.120.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
+ bohr_agent_sdk-0.1.120.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
+ bohr_agent_sdk-0.1.120.dist-info/RECORD,,
@@ -59,6 +59,7 @@ def init_executor(executor_config: Optional[dict] = None):
59
59
  @contextmanager
60
60
  def set_directory(workdir: str):
61
61
  cwd = os.getcwd()
62
+ workdir = os.path.join(CALCULATION_MCP_WORKDIR, workdir)
62
63
  os.makedirs(workdir, exist_ok=True)
63
64
  try:
64
65
  os.chdir(workdir)
@@ -82,8 +83,7 @@ def query_job_status(job_id: str, executor: Optional[dict] = None
82
83
  status (str): One of "Running", "Succeeded" or "Failed"
83
84
  """
84
85
  trace_id, exec_id = job_id.split("/")
85
- workdir = os.path.join(CALCULATION_MCP_WORKDIR, trace_id)
86
- with set_directory(workdir):
86
+ with set_directory(trace_id):
87
87
  executor = load_job_info()["executor"] or executor
88
88
  _, executor = init_executor(executor)
89
89
  status = executor.query_status(exec_id)
@@ -98,8 +98,7 @@ def terminate_job(job_id: str, executor: Optional[dict] = None):
98
98
  job_id (str): The ID of the calculation job
99
99
  """
100
100
  trace_id, exec_id = job_id.split("/")
101
- workdir = os.path.join(CALCULATION_MCP_WORKDIR, trace_id)
102
- with set_directory(workdir):
101
+ with set_directory(trace_id):
103
102
  executor = load_job_info()["executor"] or executor
104
103
  _, executor = init_executor(executor)
105
104
  executor.terminate(exec_id)
@@ -244,8 +243,7 @@ def get_job_results(job_id: str, executor: Optional[dict] = None,
244
243
  results (Any): results of the calculation job
245
244
  """
246
245
  trace_id, exec_id = job_id.split("/")
247
- workdir = os.path.join(CALCULATION_MCP_WORKDIR, trace_id)
248
- with set_directory(workdir):
246
+ with set_directory(trace_id):
249
247
  job_info = load_job_info()
250
248
  executor = job_info["executor"] or executor
251
249
  storage = job_info["storage"] or storage
@@ -394,7 +392,7 @@ class CalculationMCPServer:
394
392
  if create_workdir is False:
395
393
  workdir = "."
396
394
  else:
397
- workdir = os.path.join(CALCULATION_MCP_WORKDIR, trace_id)
395
+ workdir = trace_id
398
396
  with set_directory(workdir):
399
397
  if preprocess_func is not None:
400
398
  executor, storage, kwargs = preprocess_func(
@@ -439,7 +437,7 @@ class CalculationMCPServer:
439
437
  and executor_type == "local"):
440
438
  workdir = "."
441
439
  else:
442
- workdir = os.path.join(CALCULATION_MCP_WORKDIR, trace_id)
440
+ workdir = trace_id
443
441
  with set_directory(workdir):
444
442
  kwargs, input_artifacts = handle_input_artifacts(
445
443
  fn, kwargs, storage)