Skip to content

Commit f1dca48

Browse files
committed
remove requirements
1 parent b34dc6c commit f1dca48

File tree

9 files changed

+18
-28
lines changed

9 files changed

+18
-28
lines changed

docs/docs/deploy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ Run python `deploy.py` for deployment on Volcengine FaaS platform.
8181
- `app_name`:部署在云上的 Agent 应用名称(与VeFaaS应用名称不一定对应,此处为服务级别)
8282
- `agent`:你提供服务的 Agent 实例
8383
- `short_term_memory`:短期记忆,为空则默认初始化in-memory短期记忆,重启后即消失
84-
- `requirement_file_path`:依赖文件路径,VeADK 能够自动将其移动到 `src/requirements.txt`
8584
3. 使用`python deploy.py`进行云端部署
8685

8786
如果你想在部署到云端前进行本地运行来测试代码问题,可以在 `deploy.py` 中的 `engine.deploy` 调用处,添加参数:`local_test=True`。添加后,在部署前将会启动相关服务,测试启动是否正常。

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ dependencies = [
2121
"opentelemetry-exporter-otlp>=1.35.0",
2222
"opentelemetry-instrumentation-logging>=0.56b0",
2323
"wrapt>=1.17.2", # For patching built-in functions
24+
"openai==1.99.9" # For fix https://github.com/BerriAI/litellm/issues/13710
2425
]
2526

2627
[project.scripts]

veadk/cli/cli_deploy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def deploy(
7979
"local_dir_name": tmp_dir_name,
8080
"app_name": user_proj_abs_path.name,
8181
"agent_module_name": user_proj_abs_path.name,
82-
"requirement_file_path": str(user_proj_abs_path / "requirements.txt"),
8382
"short_term_memory_backend": short_term_memory_backend,
8483
"vefaas_application_name": vefaas_app_name,
8584
"veapig_instance_name": veapig_instance_name,

veadk/cloud/cloud_agent_engine.py

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import os
16-
import shutil
1716
import socket
1817
import subprocess
1918
import time
@@ -26,7 +25,7 @@
2625
from veadk.config import getenv
2726
from veadk.integrations.ve_faas.ve_faas import VeFaaS
2827
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
3029

3130
logger = get_logger(__name__)
3231

@@ -56,22 +55,22 @@ def _prepare(self, path: str, name: str):
5655
f"Invalid Volcengine FaaS function name `{name}`, please use lowercase letters and numbers, or replace it with a `-` char."
5756
)
5857

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+
# )
7574

7675
def _try_launch_fastapi_server(self, path: str):
7776
"""Try to launch a fastapi server for tests according to user's configuration.

veadk/integrations/ve_faas/template/cookiecutter.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"local_dir_name": "veadk_vefaas_proj",
33
"app_name": "weather-report",
44
"agent_module_name": "weather_agent",
5-
"requirement_file_path": "./weather_agent/requirements.txt",
65
"short_term_memory_backend": "local",
76
"vefaas_application_name": "weather-reporter",
87
"veapig_instance_name": "",

veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@
2121
agent_run_config = AgentRunConfig(
2222
app_name="{{ cookiecutter.app_name }}",
2323
agent=agent, # type: ignore
24-
requirement_file_path="{{ cookiecutter.requirement_file_path }}",
2524
short_term_memory=ShortTermMemory(backend="{{ cookiecutter.short_term_memory_backend }}"), # type: ignore
2625
)

veadk/integrations/ve_faas/template/{{cookiecutter.local_dir_name}}/src/{{ cookiecutter.app_name|replace('-', '_') }}/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

veadk/integrations/ve_faas/ve_faas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def _release_application(self, app_id: str):
180180
host="open.volcengineapi.com",
181181
)
182182

183-
logger.info(f"Start to release VeFaaS application {app_id}.")
184183
status, full_response = self._get_application_status(app_id)
185184
while status not in ["deploy_success", "deploy_fail"]:
186185
time.sleep(10)

veadk/types.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,3 @@ class AgentRunConfig(BaseModel):
4040
short_term_memory: ShortTermMemory = Field(
4141
default_factory=ShortTermMemory, description="The short-term memory instance"
4242
)
43-
44-
requirement_file_path: str = Field(
45-
..., description="The relative path to the requirements file"
46-
)

0 commit comments

Comments
 (0)