bohr-agent-sdk 0.1.121__py3-none-any.whl → 0.1.122__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.121
3
+ Version: 0.1.122
4
4
  Summary: SDK for scientific agents
5
5
  Home-page: https://github.com/dptech-corp/bohr-agent-sdk/
6
6
  Author: DP Technology
@@ -67,7 +67,7 @@ dp/agent/server/preprocessor.py,sha256=XUWu7QOwo_sIDMYS2b1OTrM33EXEVH_73vk-ju1Ok
67
67
  dp/agent/server/utils.py,sha256=cIKaAg8UaP5yMwvIVTgUVBjy-B3S16bEdnucUf4UDIM,2055
68
68
  dp/agent/server/executor/__init__.py,sha256=s95M5qKQk39Yi9qaVJZhk_nfj54quSf7EDghR3OCFUA,248
69
69
  dp/agent/server/executor/base_executor.py,sha256=nR2jI-wFvKoOk8QaK11pnSAkHj2MsE6uyzPWDx-vgJA,3018
70
- dp/agent/server/executor/dispatcher_executor.py,sha256=CZRxbVkLaDvStXhNaMKrKcx2Z0tPPVzIxkU1ufqWgYc,12081
70
+ dp/agent/server/executor/dispatcher_executor.py,sha256=lWofctAt2Nemrd3OF-IMBVWgVLKVanHDo3iMTE5lot0,12529
71
71
  dp/agent/server/executor/local_executor.py,sha256=qRVnfqhvaCGBXr-NO4uxcUteFja2BE_6NXauVJ8vnoo,6642
72
72
  dp/agent/server/storage/__init__.py,sha256=Sgsyp5hb0_hhIGugAPfQFzBHt_854rS_MuMuE3sn8Gs,389
73
73
  dp/agent/server/storage/base_storage.py,sha256=728-oNG6N8isV95gZVnyi4vTznJPJhSjxw9Gl5Y_y5o,2356
@@ -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.121.dist-info/METADATA,sha256=XmoIwg0w1lwcTBKw8eboMgxUh5ONqL4rIZwHOlSWZLg,11070
79
- bohr_agent_sdk-0.1.121.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
80
- bohr_agent_sdk-0.1.121.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
- bohr_agent_sdk-0.1.121.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
- bohr_agent_sdk-0.1.121.dist-info/RECORD,,
78
+ bohr_agent_sdk-0.1.122.dist-info/METADATA,sha256=6PXBgaHU2sAKQJHYdN52tD18u7uIpmFEAgVbMBeSNWA,11070
79
+ bohr_agent_sdk-0.1.122.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
80
+ bohr_agent_sdk-0.1.122.dist-info/entry_points.txt,sha256=5n5kneF5IbDQtoQ2WfF-QuBjDtsimJte9Rv9baSGgc0,86
81
+ bohr_agent_sdk-0.1.122.dist-info/top_level.txt,sha256=87xLUDhu_1nQHoGLwlhJ6XlO7OsjILh6i1nX6ljFzDo,3
82
+ bohr_agent_sdk-0.1.122.dist-info/RECORD,,
@@ -3,6 +3,7 @@ import inspect
3
3
  import json
4
4
  import logging
5
5
  import os
6
+ import shutil
6
7
  import sys
7
8
  import time
8
9
  from pathlib import Path
@@ -182,9 +183,17 @@ class DispatcherExecutor(BaseExecutor):
182
183
  for package in self.python_packages:
183
184
  target = os.path.basename(package)
184
185
  if os.path.abspath(package) != os.path.abspath(target):
185
- if os.path.islink(target):
186
- os.remove(target)
187
- os.symlink(package, target)
186
+ copy_method = os.getenv("DISPATCHER_EXECUTOR_COPY_METHOD",
187
+ "symlink")
188
+ if copy_method == "symlink":
189
+ if os.path.islink(target):
190
+ os.remove(target)
191
+ os.symlink(package, target)
192
+ elif copy_method == "copy":
193
+ if os.path.isfile(package):
194
+ shutil.copy(package, target)
195
+ elif os.path.isdir(package):
196
+ shutil.copytree(package, target)
188
197
  if target not in forward_files:
189
198
  forward_files.append(target)
190
199
  for value in kwargs.values():