diff --git a/src/utils/utils.py b/src/utils/utils.py index 87c7836209..70661aaa1b 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -451,7 +451,18 @@ def v3_counter_csv_to_v2_csv(counter_file, agent_info_filepath, converted_csv_fi ) ) if result["Agent_Id"].dtype == "object": - result["Agent_Id"] = result["Agent_Id"].str.extract("(\d+)").astype("int64") + try: + result["Agent_Id"] = ( + result["Agent_Id"] + .apply(lambda x: int(re.search(r"Agent (\d+)", x).group(1))) + .astype("int64") + ) + except Exception as e: + console_error( + 'Parsing rocprofv3 csv output: Error of getting "Agent_Id", the error message "{}"'.format( + e + ) + ) # Grab the Wave_Front_Size column from agent info result = result.merge(