Hi, I'd like to generate complete event logs from logs with a single timestamp.
However, I am unable to generate them with the latest version of the repository due to the following bugs.
I tried to fix each of them as described below, but after point 3 in the prediction phase, I was unable to continue. Could you help me?
TRAINING PHASE
python dg_training.py -f Helpdesk.xes -m lstm -e 1 -o bayesian
- SETTINGS
if parameters['model_family'] == 'lstm':
parameters['model_type'] = ['shared_cat'] ### set parameter to "shared_cat"
the parameters['one_timestamp'] as True (row 32 of file dg_training)
-
File "...GenerativeLSTM-master/venv/lib/python3.10/site-packages/readers/log_reader.py", line 199, in append_csv_start_end
group.start_timestamp.min()-timedelta(microseconds=1)) ----> SOLUTION: if not self.one_timestamp: (add this before line 199)
-
File "/GenerativeLSTM-master/venv/lib/python3.10/site-packages/readers/log_reader.py", line 213, in append_csv_start_end
temp_event['end_timestamp'] = end_start_times[(key, new_event)]
KeyError: ('Case1', 'Start') ------> SOLUTION: type = ['End'] if self.one_timestamp else ['Start', 'End']
for new_event in type:
-
File "/GenerativeLSTM-master/model_training/features_manager.py", line 110, in add_calculated_times
events[i]['weekday'] = events[i]['start_timestamp'].weekday()
KeyError: 'start_timestamp' -----> SOLUTION: if self.one_timestamp:
events[i]['weekday'] = events[i]['end_timestamp'].weekday()
else:
events[i]['weekday'] = events[i]['start_timestamp'].weekday()
PREDICTION PHASE
python dg_prediction.py -a pred_log -c 20240919_23AC81E8_6222_408A_96B4_F3D0F11A8674 -b Helpdesk.h5 -v random_choice -r 1
-
parameters['one_timestamp'] = True riga 32 dg_prediction.py
-
File "/GenerativeLSTM-master/venv/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 4316, in _validate_can_reindex
raise ValueError("cannot reindex on an axis with duplicate labels") ----> SOLUTION: put as comment line 147 log_reader.py
-
File "GenerativeLSTM-master/venv/lib/python3.10/site-packages/pandas/core/generic.py", line 5902, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'start_timestamp'. Did you mean: 'to_timestamp'? -----> SOLUTION:
if self.parms['one_timestamp']:
self.parms['start_time'] = self.log.end_timestamp.min()
else:
self.parms['start_time'] = self.log.start_timestamp.min()
Finally, I tried also with the release "v1.1.0" and in this case the generation of entire log works but the timestamps of events seem to be wrong.
All tracks start at the same time and the timestamps of the following events are also identical in all traces, as shown in this example::
Trace 1: <ER Registration, Role1, 2014-10-31 09:04:50>, <ER Triage, Role1, 2014-10-31 09:05:17>, <ER Sepsis Triage, Role1, 2014-10-31 09:05:25> , <LacticAcid, Role1, 2014-10-31 09:05:26> ....
Trace 2: <ER Registration, Role1, 2014-10-31 09:04:50>, <ER Triage, Role1, 2014-10-31 09:05:17>, <ER Sepsis Triage, Role1, 2014-10-31 09:05:25> , <Leucocytes, Role1, 2014-10-31 09:05:26> ....
Instead, for logs with both timestamps (start and end), event generation works fine.
Thanks in advance :)
Hi, I'd like to generate complete event logs from logs with a single timestamp.
However, I am unable to generate them with the latest version of the repository due to the following bugs.
I tried to fix each of them as described below, but after point 3 in the prediction phase, I was unable to continue. Could you help me?
TRAINING PHASE
python dg_training.py -f Helpdesk.xes -m lstm -e 1 -o bayesian
if parameters['model_family'] == 'lstm':
parameters['model_type'] = ['shared_cat'] ### set parameter to "shared_cat"
the parameters['one_timestamp'] as True (row 32 of file dg_training)
File "...GenerativeLSTM-master/venv/lib/python3.10/site-packages/readers/log_reader.py", line 199, in append_csv_start_end
group.start_timestamp.min()-timedelta(microseconds=1)) ----> SOLUTION: if not self.one_timestamp: (add this before line 199)
File "/GenerativeLSTM-master/venv/lib/python3.10/site-packages/readers/log_reader.py", line 213, in append_csv_start_end
temp_event['end_timestamp'] = end_start_times[(key, new_event)]
KeyError: ('Case1', 'Start') ------> SOLUTION: type = ['End'] if self.one_timestamp else ['Start', 'End']
for new_event in type:
File "/GenerativeLSTM-master/model_training/features_manager.py", line 110, in add_calculated_times
events[i]['weekday'] = events[i]['start_timestamp'].weekday()
KeyError: 'start_timestamp' -----> SOLUTION: if self.one_timestamp:
events[i]['weekday'] = events[i]['end_timestamp'].weekday()
else:
events[i]['weekday'] = events[i]['start_timestamp'].weekday()
PREDICTION PHASE
python dg_prediction.py -a pred_log -c 20240919_23AC81E8_6222_408A_96B4_F3D0F11A8674 -b Helpdesk.h5 -v random_choice -r 1
parameters['one_timestamp'] = True riga 32 dg_prediction.py
File "/GenerativeLSTM-master/venv/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 4316, in _validate_can_reindex
raise ValueError("cannot reindex on an axis with duplicate labels") ----> SOLUTION: put as comment line 147 log_reader.py
File "GenerativeLSTM-master/venv/lib/python3.10/site-packages/pandas/core/generic.py", line 5902, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'start_timestamp'. Did you mean: 'to_timestamp'? -----> SOLUTION:
if self.parms['one_timestamp']:
self.parms['start_time'] = self.log.end_timestamp.min()
else:
self.parms['start_time'] = self.log.start_timestamp.min()
Finally, I tried also with the release "v1.1.0" and in this case the generation of entire log works but the timestamps of events seem to be wrong.
All tracks start at the same time and the timestamps of the following events are also identical in all traces, as shown in this example::
Trace 1: <ER Registration, Role1, 2014-10-31 09:04:50>, <ER Triage, Role1, 2014-10-31 09:05:17>, <ER Sepsis Triage, Role1, 2014-10-31 09:05:25> , <LacticAcid, Role1, 2014-10-31 09:05:26> ....
Trace 2: <ER Registration, Role1, 2014-10-31 09:04:50>, <ER Triage, Role1, 2014-10-31 09:05:17>, <ER Sepsis Triage, Role1, 2014-10-31 09:05:25> , <Leucocytes, Role1, 2014-10-31 09:05:26> ....
Instead, for logs with both timestamps (start and end), event generation works fine.
Thanks in advance :)