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

fixed bug with is_transformer #274

Merged
merged 1 commit into from
Jan 23, 2022

Conversation

seanmacavaney
Copy link
Collaborator

Related to #258 -- subclasses of pt.Transformer doesn't pass is_transformer check because it checks for TransformerBase (a subclass of Transformer).

This means that you wouldn't be able to use a subclass of pt.Transformer in a pipeline. E.g.,

class MyModel(pt.Transformer):
    pass
bm25 >> MyModel() # would fail with message saying MyModel cannot be coerced into a transformer

Since most code still uses TransformerBase, it doesn't break existing code -- just new stuff written using the new name.

Added tests that failed with previous impl and added fix.

@cmacdonald cmacdonald merged commit 8b0465f into terrier-org:master Jan 23, 2022
@seanmacavaney
Copy link
Collaborator Author

One of the checks failed, but it just seems to be a network error.

@cmacdonald
Copy link
Contributor

yes. enough passed that I was comfortable

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