Skip to content

Data processor logger #526

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nkanazawa1989
Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 commented Nov 12, 2021

Summary

This PR simplifies the interface of data processor.

Currently the processor has two interfaces:

nominals, error, history = my_processor.call_with_history(data)
nominals, error = my_processor(data)

to eliminate boilerplate code it internally implements _call_internals method, but its return type will dynamically change depending on input flag.

Details and comments

This PR simplifies the implementation by redefining the history mode as a callback. Namely,

history = DataLogger()

nominals, error = my_processor(data, callback=history)
history.data()

if you don't need history you just

nominals, error = my_processor(data)

so you can use the same interface.

@nkanazawa1989 nkanazawa1989 added the blocked Can't be worked on until another issue is resolved label Nov 12, 2021
@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Can't be worked on until another issue is resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants