mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[release] prettier output of release test results and artifacts (#18337)
This commit is contained in:
parent
9a8ca6a69d
commit
6aa8a4eddc
1 changed files with 24 additions and 0 deletions
|
@ -523,6 +523,28 @@ def report_result(test_suite: str, test_name: str, status: str, logs: str,
|
|||
)
|
||||
|
||||
|
||||
def log_results_and_artifacts(result: Dict):
|
||||
results = result.get("results", {})
|
||||
if results:
|
||||
msg = "Observed the following results:\n\n"
|
||||
|
||||
for key, val in results.items():
|
||||
msg += f" {key} = {val}\n"
|
||||
else:
|
||||
msg = "Did not find any results."
|
||||
logger.info(msg)
|
||||
|
||||
artifacts = result.get("artifacts", {})
|
||||
if artifacts:
|
||||
msg = "Saved the following artifacts:\n\n"
|
||||
|
||||
for key, val in artifacts.items():
|
||||
msg += f" {key} = {val}\n"
|
||||
else:
|
||||
msg = "Did not find any artifacts."
|
||||
logger.info(msg)
|
||||
|
||||
|
||||
def _cleanup_session(sdk: AnyscaleSDK, session_id: str):
|
||||
if session_id:
|
||||
# Just trigger a request. No need to wait until session shutdown.
|
||||
|
@ -1695,6 +1717,8 @@ def run_test_config(
|
|||
|
||||
logger.info(f"Final results: {result}")
|
||||
|
||||
log_results_and_artifacts(result)
|
||||
|
||||
shutil.rmtree(temp_dir)
|
||||
|
||||
return result
|
||||
|
|
Loading…
Add table
Reference in a new issue