Skip to content

Commit

Permalink
doc: document a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiwowar committed Dec 4, 2023
1 parent eeb8aa9 commit d36eb9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/xpmir/letor/samplers/hydrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ def transform_documents(self, documents: List[ir.Document]):


class PairwiseTransformAdapter(PairwiseSampler):
"""Transforms pairwise samples using an adapter
It is interesting to use this adapter since the transformation is only
performed if the samples are used: when using a SkippingIterator, when
recovering a checkpoint, all the records might have to be processed
otherwise.
"""

sampler: Param[PairwiseSampler]
"""The distillation samples without texts for query and documents"""

Expand Down
5 changes: 3 additions & 2 deletions src/xpmir/neural/cross.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ def distribute_models(self, update):


class DuoCrossScorer(DuoLearnableScorer, DistributableModel):
"""Query-document-document Representation classifier based on Bert
The encoder usually refer to the encoder of type DualDuoBertTransformerEncoder()
"""Preference based classifier
This scorer can be used to train a DuoBERT-type model.
"""

encoder: Param[TripletTextEncoder]
Expand Down

0 comments on commit d36eb9c

Please sign in to comment.