評估
加入 Hugging Face 社群
並獲得增強的文件體驗
儲存方法
用於儲存評估結果的方法
儲存
evaluate.save
< 源 > ( path_or_file **data )
引數
- path_or_file (
str
) — 用於儲存檔案的路徑或檔案。如果只提供一個資料夾,結果檔案將以 "result-%Y_%m_%d-%H_%M_%S.json"
的格式儲存。
將結果儲存到 JSON 檔案中。同時儲存系統資訊,例如當前時間、如果位於倉庫中則儲存當前提交的雜湊值,以及 Python 系統資訊。
示例
>>> import evaluate
>>> result = {"bleu": 0.7}
>>> params = {"model": "gpt-2"}
>>> evaluate.save("./results/", **result, **params)
< > 在 GitHub 上更新
© . This site is unofficial and not affiliated with Hugging Face, Inc.