diff --git a/.github/workflows/run-max-num-tokens.yml b/.github/workflows/run-max-num-tokens.yml index fe6b4cf7a..82d2436c4 100644 --- a/.github/workflows/run-max-num-tokens.yml +++ b/.github/workflows/run-max-num-tokens.yml @@ -59,6 +59,7 @@ jobs: run: | python3 llm/run_max_num_tokens.py "${{ inputs.running_template }}" - name: Upload test logs + if: always() uses: actions/upload-artifact@v3 with: path: tests/integration/max_num_token_results/ diff --git a/tests/integration/llm/run_max_num_tokens.py b/tests/integration/llm/run_max_num_tokens.py index 29b1e3208..6dfd173a3 100644 --- a/tests/integration/llm/run_max_num_tokens.py +++ b/tests/integration/llm/run_max_num_tokens.py @@ -17,9 +17,8 @@ json_str = [line.decode("utf-8").strip() for line in data][0] model_tp_dict = json.loads(json_str) - log_id = 0 for model_id, tp_list in model_tp_dict.items(): - model_name = model_id + model_name = os.path.basename(os.path.normpath(model_id)) print(f"Starting runs for model {model_name}:") if model_id[:2] == 's3': # download model @@ -49,6 +48,6 @@ model, tp, max_tokens = max_token_finder(properties) output = f"Summary:\nmodel: {model_name}\n tp: {tp}\n max_tokens: {max_tokens}" print(output) - with open("max_num_token_results/" + str(log_id) + "_log.txt", + with open(f"max_num_token_results/{model_name}_{tp}_log.txt", "w") as log_file: log_file.write(output)