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

Conditionally add tensorflow dependent primitives to top level primitives #105

Merged
merged 7 commits into from
Feb 28, 2022

Conversation

rwedge
Copy link
Contributor

@rwedge rwedge commented Feb 18, 2022

Uses importlib to check for a tensorflow module before adding UniversalSentenceEncoder and Elmo to top level imports for the library

@rwedge rwedge changed the title Conditionally add USE to top level primitives Conditionally add tensorflow dependent primitives to top level primitives Feb 18, 2022
@rwedge rwedge requested a review from a team February 18, 2022 23:58
Comment on lines +31 to +32
def test_name_in_primitive_list(universal_sentence_encoder):
assert PRIMITIVES.name.eq(universal_sentence_encoder.name).any()
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason to add a similar test for Elmo?

Copy link
Contributor Author

@rwedge rwedge Feb 28, 2022

Choose a reason for hiding this comment

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

The Elmo tests use the PrimitiveT test class so there should already be a test like that for Elmo

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, yes. Got it.

Copy link
Contributor

@thehomebrewnerd thehomebrewnerd left a comment

Choose a reason for hiding this comment

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

LGTM!

@rwedge rwedge merged commit dfde88e into main Feb 28, 2022
@rwedge rwedge deleted the conditionally-load-USE branch February 28, 2022 16:07
@gsheni gsheni mentioned this pull request Feb 28, 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.

None yet

2 participants