Skip to content

Commit

Permalink
Add runtime tag in CI job (#81)
Browse files Browse the repository at this point in the history
* Add runtime tag in CI job

* Improve test robustness

* Revert change

* Use http body instead of header for runtime_tag

---------

Co-authored-by: Yazhou Cao <[email protected]>
  • Loading branch information
AsiaCao and humpydonkey authored May 13, 2024
1 parent 9261d4e commit 736a0b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
python-version: [3.9, 3.11]
os: [ ubuntu-22.04, windows-2022, macos-12 ]
runs-on: ${{ matrix.os }}
env:
RUNTIME_TAG: ci_job
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
5 changes: 2 additions & 3 deletions vision_agent/tools/tool_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
def _send_inference_request(
payload: Dict[str, Any], endpoint_name: str
) -> Dict[str, Any]:
# runtime_tag is used to differentiate different internal callers
runtime_tag = os.environ.get("RUNTIME_TAG", "")
if runtime_tag := os.environ.get("RUNTIME_TAG", ""):
payload["runtime_tag"] = runtime_tag
res = requests.post(
f"{_LND_API_URL}/model/{endpoint_name}",
headers={
"Content-Type": "application/json",
"apikey": _LND_API_KEY,
"runtime-tag": runtime_tag,
},
json=payload,
)
Expand Down

0 comments on commit 736a0b8

Please sign in to comment.