Skip to content

Commit

Permalink
fix: doc ci (#668)
Browse files Browse the repository at this point in the history
* fix: doc ci

* fix: remove endpoint->model meta calling error

* fix: logger info exception

* fix: logger lint

* chore: bump version
  • Loading branch information
danielhjz authored Jul 16, 2024
1 parent cc2ece1 commit 3e1be76
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
pip install poetry
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
poetry lock
poetry lock --no-update
- name: Get Poetry version
run: poetry --version
- name: Setup Python Cache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/doc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- name: Install
run: |
pip3 install poetry
poetry lock --no-update
make install
- name: Build docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qianfan"
version = "0.4.1.1"
version = "0.4.1.2"
description = "文心千帆大模型平台 Python SDK"
authors = []
license = "Apache-2.0"
Expand Down
7 changes: 3 additions & 4 deletions python/qianfan/dataset/stress_test/load_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ def model_details(endpoint: str) -> Optional[Dict[str, Any]]:
if temp[-1] == endpoint:
return inf
return None
except Exception as e:
logging.error(f"An error occurred: {e}")
except Exception:
return None


Expand Down Expand Up @@ -177,7 +176,7 @@ def run(self, user_num: Optional[int] = None) -> Dict[str, Any]:
if GlobalData.data["threshold_first"].value == 1:
log_info = "首token超时, 超时token: " + self.dataset[0][0]["prompt"]
self.model_info["log_info"] = log_info
logger.info("首token超时, 超时token:", self.dataset[0][0]["prompt"])
logger.info(f"首token超时, 超时token: {self.dataset[0][0]['prompt']}")
html_table = generate_html_table(html, self.model_info)
with open(html_path, "w", encoding="utf-8") as f:
f.write(html_table)
Expand All @@ -201,5 +200,5 @@ def run(self, user_num: Optional[int] = None) -> Dict[str, Any]:
with open(html_path, "w", encoding="utf-8") as f:
f.write(html_table)
end_time = time.time()
logger.info("Log path: %s" % ret["logfile"])
logger.info(f"Log path: {ret['logfile']}")
return ret

0 comments on commit 3e1be76

Please sign in to comment.