Skip to content

Extract the valid listen event definition enforcement into a dedicated module - #25

Merged
Krisenberg merged 10 commits into
mainfrom
23/filter-out-non-listen-events
Jun 11, 2026
Merged

Krisenberg merged 10 commits into
mainfrom
23/filter-out-non-listen-events

Conversation

@Krisenberg

Copy link
Copy Markdown
Owner

Closes #23

Changelog:

  • src/impact/features/preprocessing.py: extracted the logic that enforces valid listen events definition into a separate, dedicated module.
  • src/impact/features/sessionization.py: remove filtering out non-listen events.
  • src/impact/models/actr/history_index.py: remove filtering out non-listen events.
  • src/impact/pipelines/impact_evaluation_pipeline.py: renamed and adjusted ImpactEvaluationPipeline so that it accepts listens_lf instead of events_df, replaced TensorizedSplit with TensorizedDataset argument to evaluate() method to let the caller decide on which split the evaluation will be run.
  • src/impact/pipelines/data_pipeline.py: unified the logic across all DataPipeline methods, improved the docstrings making them more informative and 'transparent'.
  • src/impact/utils.py: moved all import statements to the top-level (module level).
  • adjusted all the modules impacted by those changes accordingly (e.g. src/impact/main.py, scripts/*).

… defining what constitutes a valid listen event
… to make filtering raw events part of the data pipeline flow
…he logic related to filtering out non-listen events
…define it as a module-level constant in features/preprocessing.py
…and define it as a module-level constant in features/sessionization.py
…ning only listen events that comply with the listen event definition
…s, improve the docstrings making them more informative and 'transparent'
…od from DataPipeline (caching is handled directly in specific methods)
…ationPipeline, expose listens_lf arg instead of events_lf, replace TensorizedSplit with TensorizedDataset argument to evaluate() method to let the caller decide on which split the evaluation will be run
@Krisenberg Krisenberg self-assigned this Jun 11, 2026
@Krisenberg Krisenberg added bug Something isn't working enhancement New feature or request labels Jun 11, 2026
@Krisenberg
Krisenberg merged commit 212492f into main Jun 11, 2026
3 checks passed
@Krisenberg
Krisenberg deleted the 23/filter-out-non-listen-events branch June 11, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter out non-listen events before indexing user histories for ACT-R

1 participant