-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix local auto labeling #600
base: master
Are you sure you want to change the base?
Conversation
log_to_field: Optional[str] = None, | ||
is_prediction: Optional[bool] = True | ||
) -> Dict[str, Any]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a is_prediction
kwarg on a predict_with_...
function is IMO really confusing API design.
I won't put my foot down and I will push this through for whatever you need right now, but we will probably need to change this in the near future if you want people to actually be using this.
Either way, thanks for adding the docstring
for prediction, remote_path in zip( | ||
predict_fn(local_paths), | ||
[predict_fn(local_paths)], | ||
[result.path for result in self[idx * batch_size : (idx + 1) * batch_size]], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blocker] This doesn't look right.
The signature of CustomPredictor
(predict_fn) is:
CustomPredictor = Callable[
[List[str]],
List[Tuple[Any, Optional[float]]],
]
So the function should be accepting a list of datapoints, and return a list of prediction tuples.
Why are you wrapping the result in another list? This zip will end up processing all of the returned predictions for one single path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the return from the prediction function you're using right now look like?
Fixed an issue where the auto-labeling expected format for local and dockerized instances was different.
Need to update the docs active learning page