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

Unittests for Taskmodule #34

Merged
merged 3 commits into from
Jan 13, 2022
Merged

Unittests for Taskmodule #34

merged 3 commits into from
Jan 13, 2022

Conversation

ChristophAlt
Copy link
Collaborator

  • Unittests for Taskmodule
  • Improve configuration of pytest and isort
  • Check examples with mypy
  • Fix: transformer span classification should only return the probability of the predicted label
  • Fix: Taskmodule should return documents in sorted order in all cases

Copy link
Owner

@ArneBinder ArneBinder left a comment

Choose a reason for hiding this comment

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

Looks very good! just one minor

Comment on lines 149 to 153
documents: Dict[Document, Document] = {}
for encoding in encodings:
if encoding.document not in documents:
documents[encoding.document] = encoding.document
all_documents = list(documents.values())
Copy link
Owner

Choose a reason for hiding this comment

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

Can we rename documents to document_mapping?

Suggested change
documents: Dict[Document, Document] = {}
for encoding in encodings:
if encoding.document not in documents:
documents[encoding.document] = encoding.document
all_documents = list(documents.values())
document_mapping: Dict[Document, Document] = {}
for encoding in encodings:
if encoding.document not in document_mapping:
document_mapping[encoding.document] = encoding.document
all_documents = list(document_mapping.values())

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@ChristophAlt ChristophAlt merged commit 6413243 into main Jan 13, 2022
@ArneBinder ArneBinder deleted the taskmodule_tests branch January 22, 2022 14:51
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