Skip to content

Easier use of document stream in evaluation #229

@thopkins32

Description

@thopkins32

Currently, the EvaluationFunction protocol makes some assumptions about how you retrieve the acquired data that was just collected. We should explore what it may look like to access data in-process rather than relying on Tiled or some other service to fetch the data.

You could technically do this now by ignoring the uid argument and writing something like:

cache = []
def document_cache_callback(...):
    """Cache the documents of each run"""
    ...

RE.subscribe(document_cache_callback)

def custom_evaluation(uid: str, suggestions: list[dict]) -> list[dict]:
    """Use the cache instead of uid"""
    ...

It's a bit awkward to do so maybe there is something Blop can do to make this simple.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions