Skip to content

Conversation

@wmilkowska
Copy link
Contributor

No description provided.

Comment on lines 105 to 106
max_pause_duration = 2.0
if finish_time - start_time > max_pause_duration:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not convinced that this filters out fragments with long pauses - this condition seems to be true for every variant that is longer than 2s :)

Comment on lines 81 to 82
max_fragments = 5
max_variants = 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to separate this logic from the prepare_fragments function. If we want the dashboard to be helpful in reviewing different fragmentation methods, a structure like this would be better:

fragments = prepare_fragments(df, piece, n)

filtering_method = st.select_box(
  label="Filtering method",
  options=["Top 5", "Fastes", "Longest"],
)

if filtering_method == "Top 5":
  filtered_fragments = top_five_filtering(fragments)
elif filtering_method == "Fastes":
  filtered_fragments = get_fastests_filtering(fragments)
...

for fragment in filtered_fragments:
  # Dsiplay
  ...

That way, you'll also be forced to come up with names for different filtering strategies, which will be useful in reviewing :)

@wmilkowska
Copy link
Contributor Author

For now I've set the n_clustering parameter to a fixed amount (16), and now you have the option to choose between displaying the first five fragments, the longest and the fastest fragments. Also, now if you want to test it on different files, you don't have to rerun Streamlit every time:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants