Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix local auto labeling #600

wants to merge 3 commits into from

Conversation

deanp70
Copy link
Member

@deanp70 deanp70 commented Feb 27, 2025

Fixed an issue where the auto-labeling expected format for local and dockerized instances was different.

Need to update the docs active learning page

@deanp70 deanp70 requested a review from kbolashev February 27, 2025 11:46
Copy link

dagshub bot commented Feb 27, 2025

Comment on lines 551 to 553
log_to_field: Optional[str] = None,
is_prediction: Optional[bool] = True
) -> Dict[str, Any]:
Copy link
Member

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

Comment on lines 965 to 967
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]],
Copy link
Member

@kbolashev kbolashev Feb 27, 2025

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.

Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants