ScoreConsumer

class ScoreConsumer[source]

Bases: object

A consumer of scores for visitor pattern.

Methods Summary

__call__(batch, target, scores)

Consume scores for the given hr_batch.

finalize()

Finalize the result to build a score pack.

Methods Documentation

abstract __call__(batch: Tensor, target: Literal['head', 'relation', 'tail'], scores: Tensor) None[source]

Consume scores for the given hr_batch.

Parameters:
Return type:

None

finalize() ScorePack[source]

Finalize the result to build a score pack.

Return type:

ScorePack