Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9refactor #314

Merged
merged 10 commits into from
Oct 27, 2022
Merged

0.9refactor #314

merged 10 commits into from
Oct 27, 2022

Conversation

cmacdonald
Copy link
Contributor

this looks similar to #286. TODO see whats here, and whats not.

 - move Terrier-specific pipeline rewriting to batchretrieve.py
 - refactor to make transformer.py smaller
@cmacdonald cmacdonald marked this pull request as draft July 27, 2022 20:00
@seanmacavaney
Copy link
Collaborator

Considering other plugin libraries that currently reference TransformerBase instead of Transformer, I'm not sure we can drop it quite yet.

@cmacdonald
Copy link
Contributor Author

its still there...!

@seanmacavaney
Copy link
Collaborator

Ah, okay, sorry. The diff makes it look like it was removed.

@cmacdonald
Copy link
Contributor Author

Just need to sort out indexing API, like in #286

@cmacdonald cmacdonald mentioned this pull request Oct 27, 2022
@cmacdonald cmacdonald marked this pull request as ready for review October 27, 2022 16:58
@cmacdonald
Copy link
Contributor Author

The advantages of this PR:

We now have stable public APIs for the main transformer classes:
pt.Transformer, pt.Estimator, pt.Indexer

Older classes have been deprecated (pt.TransformerBase, pt.EstimatorBase, pt.IterDictIndexerBase)

Refactoring as follows:

  • pyterrier/transformer.py is now smaller and focused on the public API imple
  • pyterrier/ops.py contains the operator transformer classes only (compose, feature union etc,)
  • pyterrier/apply.py - apply classes have been moved from transformer.py into pyterrier/apply_base.py

@seanmacavaney
Copy link
Collaborator

The code changes look good to me. A few suggestions:

  • Let's run tests on some of the plugin libraries, just to be sure we're not missing something major in the interface.
  • Can we write a list of breaking changes? E.g., stuff that moved from one namespace to another? They don't seem like things folks are likely to be referenced directly, but just in case. We can include it in the release notes.

@cmacdonald
Copy link
Contributor Author

Agreed to all comments.

@cmacdonald cmacdonald merged commit 583ffb9 into master Oct 27, 2022
@cmacdonald cmacdonald deleted the 0.9refactor branch October 27, 2022 17:29
@cmacdonald cmacdonald added this to the 0.9 milestone Nov 10, 2022
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.

2 participants