|
13 | 13 | # limitations under the License. |
14 | 14 |
|
15 | 15 | import os |
16 | | -import shutil |
17 | 16 | import socket |
18 | 17 | import subprocess |
19 | 18 | import time |
|
26 | 25 | from veadk.config import getenv |
27 | 26 | from veadk.integrations.ve_faas.ve_faas import VeFaaS |
28 | 27 | from veadk.utils.logger import get_logger |
29 | | -from veadk.utils.misc import formatted_timestamp, load_module_from_file |
| 28 | +from veadk.utils.misc import formatted_timestamp |
30 | 29 |
|
31 | 30 | logger = get_logger(__name__) |
32 | 31 |
|
@@ -56,22 +55,22 @@ def _prepare(self, path: str, name: str): |
56 | 55 | f"Invalid Volcengine FaaS function name `{name}`, please use lowercase letters and numbers, or replace it with a `-` char." |
57 | 56 | ) |
58 | 57 |
|
59 | | - # copy user's requirements.txt |
60 | | - module = load_module_from_file( |
61 | | - module_name="agent_source", file_path=f"{path}/agent.py" |
62 | | - ) |
63 | | - |
64 | | - requirement_file_path = module.agent_run_config.requirement_file_path |
65 | | - if Path(requirement_file_path).exists(): |
66 | | - shutil.copy(requirement_file_path, os.path.join(path, "requirements.txt")) |
67 | | - |
68 | | - logger.info( |
69 | | - f"Copy requirement file: from {requirement_file_path} to {path}/requirements.txt" |
70 | | - ) |
71 | | - else: |
72 | | - logger.warning( |
73 | | - f"Requirement file: {requirement_file_path} not found or you have no requirement file in your project. Use a default one." |
74 | | - ) |
| 58 | + # # copy user's requirements.txt |
| 59 | + # module = load_module_from_file( |
| 60 | + # module_name="agent_source", file_path=f"{path}/agent.py" |
| 61 | + # ) |
| 62 | + |
| 63 | + # requirement_file_path = module.agent_run_config.requirement_file_path |
| 64 | + # if Path(requirement_file_path).exists(): |
| 65 | + # shutil.copy(requirement_file_path, os.path.join(path, "requirements.txt")) |
| 66 | + |
| 67 | + # logger.info( |
| 68 | + # f"Copy requirement file: from {requirement_file_path} to {path}/requirements.txt" |
| 69 | + # ) |
| 70 | + # else: |
| 71 | + # logger.warning( |
| 72 | + # f"Requirement file: {requirement_file_path} not found or you have no requirement file in your project. Use a default one." |
| 73 | + # ) |
75 | 74 |
|
76 | 75 | def _try_launch_fastapi_server(self, path: str): |
77 | 76 | """Try to launch a fastapi server for tests according to user's configuration. |
|
0 commit comments