diff --git a/profiler/msprof_analyze/cluster_analyse/recipes/mstx2commop/mstx2commop.py b/profiler/msprof_analyze/cluster_analyse/recipes/mstx2commop/mstx2commop.py index 6ca80230abbe90cca79d2a17da466ed5bab83c03..edc65499246624b328f24eba3b859a1ded7ab129 100644 --- a/profiler/msprof_analyze/cluster_analyse/recipes/mstx2commop/mstx2commop.py +++ b/profiler/msprof_analyze/cluster_analyse/recipes/mstx2commop/mstx2commop.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +import json import os import pandas as pd @@ -82,13 +82,11 @@ class Mstx2Commop(BaseRecipeAnalysis): logger.warning(f"There is no stats data in {profiler_db_path}.") return None - df['value_list'] = df['value'].apply(lambda x: x.split(',')) - df['value_list_len'] = df['value_list'].apply(len) - df = df[df['value_list_len'] == 4] - df['opType_primal'] = df['value_list'].apply(lambda x: 'hcom_' + x[0][9:] + '_') - df['groupName_primal'] = df['value_list'].apply(lambda x: x[1]) - df['dataType'] = df['value_list'].apply(lambda x: x[2]) - df['count'] = df['value_list'].apply(lambda x: x[3]) + df['value'] = df['value'].apply(lambda x: json.loads(x)) + df['opType_primal'] = df['value'].apply(lambda x: x['opName'] + '_') + df['groupName_primal'] = df['value'].apply(lambda x: x['groupName']) + df['dataType'] = df['value'].apply(lambda x: x['dataType']) + df['count'] = df['value'].apply(lambda x: x['count']) df['groupName_hash'] = df['groupName_primal'].apply(double_hash).apply(str)