bptlab / TracEX

This bachelorproject focuses on event log extraction from patient journeys using large-language models.
5 stars 5 forks source link

Refactor/89-refactoring-1 #109

Closed PitButtchereit closed 7 months ago

PitButtchereit commented 7 months ago
  1. I have safe deleted the GenerationForm inside the forms.py of the Patient Journey Generator.
  2. I have given the execute and execute_and_save functions the same signature. I have also changed how the Orchestrator calls the Trace Comparator. There is no if statement inside the for loop of the Orchestrator's run method anymore. You can change the comparison basis for the Trace Comparator by adjusting the variable comparison_basis inside the module_trace_comparator.py file.
  3. I have made the rate_activity_relevance method static. Also, now by default the category relevance is "No Relevance" if no category is found in the response of the API.
  4. I have refactored all import statements to use absolute imports and used a more light syntax where I saw fit.
  5. I have refactored the query_gpt function so that it can not use function calls anymore. I have deleted the function_calls.py file in the tracex app.
  6. I've refactored most of the modules for better readability as I saw fit. This is not entirely according to what we have voted since this would have decreased readability.
  7. The cohort now gets correctly saved to the database. However there is still one issue that should be resolved by #99. The issue is that when the cohort is saved, there is no reference to the trace id yet. This results in the cohort name always being extraction.Trace.None in the django admin view.
PitButtchereit commented 7 months ago

@tkv29 With Firefox the loading spinner was not aligned in the center and @thangixd the download xes button did not open a pop up. Please have a look into the files if merge conflicts changed something.

EDIT: Both things also occur on main for me. So I guess it's firefox fault.

tkv29 commented 7 months ago

@PitButtchereit functionality still works, gj! Regarding the loading wheel and the save button, just tested it on firefox and everythin looked good to me image

Do you have adblocker or sth similiar?

PitButtchereit commented 7 months ago

Yes, I do have adblocker. I'll try to deactivate it

nils-schmitt commented 7 months ago

What are the pushed changes in the database?

PitButtchereit commented 7 months ago

What are the pushed changes in the database?

Only my user 😅 Should I delete it? I also see an user from frederic there

nils-schmitt commented 7 months ago

@tkv29 With Firefox the loading spinner was not aligned in the center and @thangixd the download xes button did not open a pop up. Please have a look into the files if merge conflicts changed something.

EDIT: Both things also occur on main for me. So I guess it's firefox fault.

BTW, I also use Firefox and the spinning wheel works as well as the downloading for me

thangixd commented 7 months ago

@tkv29 With Firefox the loading spinner was not aligned in the center and @thangixd the download xes button did not open a pop up. Please have a look into the files if merge conflicts changed something. EDIT: Both things also occur on main for me. So I guess it's firefox fault.

BTW, I also use Firefox and the spinning wheel works as well as the downloading for me

Hm weird I tested it on safari, edge, firefox and chrome and everytime a popups opens.

I asked @FR-SON. It is also working on his machine

PitButtchereit commented 7 months ago

I've merged new changes from main into this branch where the prompts where moved to the database. That's why there are so many new changes to the modules from the last commit. I'm still awaiting your feedback on the time extractor and metrics analyzer to finalize the changes.

PitButtchereit commented 7 months ago

@nils-schmitt I've adjusted the time extractor and metrics analzyer by a bit. However, due to using the apply function on dataframes inside the execute function it is not possible to move the code to seperate functions without cascading into other function calls.

We have agreed upon only using meaningful function calls in the execute function and in my opinion the state right now is the best possible solution. If you do not agree, than feel free to propose how the modules can be rewritten.