Skip to content

Commit

Permalink
use tqdm
Browse files Browse the repository at this point in the history
  • Loading branch information
wq2012 committed Jul 6, 2024
1 parent cbf5d5a commit b6fd96c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DiarizationLM/postprocess_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from absl import app
from absl import flags
import tqdm

from diarizationlm import utils

Expand Down Expand Up @@ -40,7 +41,7 @@ def main(argv: Sequence[str]) -> None:
po = utils.PromptOptions(completion_suffix=FLAGS.completion_suffix)

# Process utterances.
for utt in data_dict["utterances"]:
for utt in tqdm.tqdm(data_dict["utterances"]):
utils.postprocess_completions_for_utt(
utt,
llm_text_field="llm_text",
Expand Down
3 changes: 2 additions & 1 deletion DiarizationLM/run_finetuned_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
from absl import app
from absl import flags
import tqdm
import openai
from diarizationlm import utils

Expand Down Expand Up @@ -49,7 +50,7 @@ def main(argv: Sequence[str]) -> None:
prompt_suffix=FLAGS.prompt_suffix,
)

for utt in data_dict["utterances"]:
for utt in tqdm.tqdm(ata_dict["utterances"]):
prompts = utils.generate_prompts(utt, po=po)

utt["completions"] = []
Expand Down

0 comments on commit b6fd96c

Please sign in to comment.