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 the labeled stats shown for labeled examples #334

Merged
merged 2 commits into from
Jun 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/autolabel/labeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def run(
for current_index in track_with_stats(
indices,
postfix_dict,
total=len(inputs),
total=len(inputs) - current_index,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be "total=len(inputs) - current_index - 1"?

Copy link
Contributor

@Abhinav-Naikawadi Abhinav-Naikawadi Jun 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if current_index is the last element that has been completed so far?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current index is the latest example which has not been labeled. So, if the first five examples have been labeled, the index would be 5 (0 indexing)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay never mind then!

advance=self.CHUNK_SIZE,
console=console,
):
Expand Down Expand Up @@ -388,7 +388,7 @@ def handle_existing_task_run(
else:
print(f"Metric: {m.name}: {m.value}")
print_table(table, console=console, default_style=METRIC_TABLE_STYLE)
pprint(f"{len(llm_labels)} examples have been labeled so far.")
pprint(f"{task_run.current_index} examples have been labeled so far.")
if len(llm_labels) > 0:
console.rule("Last Annotated Example")
pprint("[bold blue]Prompt[/bold blue]: ", end="")
Expand Down