Skip to content

Commit

Permalink
fix(pm4py): fixing TBR diagnostics when the methods are called on dat…
Browse files Browse the repository at this point in the history
…aframes
  • Loading branch information
fit-alessandro-berti committed Sep 26, 2023
1 parent b456717 commit e51c5e1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from enum import Enum
from pm4py.util import exec_utils
from pm4py.util import constants
from pm4py.objects.conversion.log import converter as log_converter


class Parameters(Enum):
Expand Down Expand Up @@ -76,6 +77,8 @@ def diagnose_from_notexisting_activities(log, notexisting_activities_in_model, p
if parameters is None:
parameters = {}

log = log_converter.apply(log, variant=log_converter.Variants.TO_EVENT_LOG, parameters=parameters)

timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, xes.DEFAULT_TIMESTAMP_KEY)
diagnostics = {}

Expand Down Expand Up @@ -129,6 +132,8 @@ def diagnose_from_trans_fitness(log, trans_fitness, parameters=None):
if parameters is None:
parameters = {}

log = log_converter.apply(log, variant=log_converter.Variants.TO_EVENT_LOG, parameters=parameters)

timestamp_key = exec_utils.get_param_value(Parameters.TIMESTAMP_KEY, parameters, xes.DEFAULT_TIMESTAMP_KEY)
diagnostics = {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pm4py.objects.log.obj import EventLog, Trace, Event
from pm4py.objects.log.util import basic_filter
from pm4py.util import exec_utils
from pm4py.objects.conversion.log import converter as log_converter


class Parameters(Enum):
Expand Down Expand Up @@ -128,6 +129,8 @@ def diagnose_from_trans_fitness(log, trans_fitness, parameters=None):
if parameters is None:
parameters = {}

log = log_converter.apply(log, variant=log_converter.Variants.TO_EVENT_LOG, parameters=parameters)

diagnostics = {}
string_attributes = exec_utils.get_param_value(Parameters.STRING_ATTRIBUTES, parameters, [])
numeric_attributes = exec_utils.get_param_value(Parameters.NUMERIC_ATTRIBUTES, parameters, [])
Expand Down Expand Up @@ -209,6 +212,8 @@ def diagnose_from_notexisting_activities(log, notexisting_activities_in_model, p
if parameters is None:
parameters = {}

log = log_converter.apply(log, variant=log_converter.Variants.TO_EVENT_LOG, parameters=parameters)

diagnostics = {}
string_attributes = exec_utils.get_param_value(Parameters.STRING_ATTRIBUTES, parameters, [])
numeric_attributes = exec_utils.get_param_value(Parameters.NUMERIC_ATTRIBUTES, parameters, [])
Expand Down

0 comments on commit e51c5e1

Please sign in to comment.