Skip to content

Commit

Permalink
docs: update prompt generation docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Feb 20, 2024
1 parent 8cb475e commit 29cdbb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion datadreamer/prompt_generation/lm_prompt_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ class LMPromptGenerator(PromptGenerator):
_init_lang_model(): Initializes the language model and tokenizer.
_remove_incomplete_sentence(text): Removes incomplete sentences from the generated prompt.
_create_lm_prompt_text(selected_objects): Creates a text prompt for the language model.
_create_lm_prompt_text_batch(selected_objects_batch): Creates a batch of text prompts for the language model.
_postprocess_prompt(prompt): Post-processes the generated prompt.
_test_prompt(prompt, selected_objects): Tests if the generated prompt is valid.
generate_prompt(prompt_text): Generates a single prompt using the language model.
generate_prompts_batch(prompt_texts_batch): Generates a batch of prompts using the language model.
generate_prompts(): Generates a list of prompts based on the class names.
release(empty_cuda_cache): Releases resources and optionally empties the CUDA cache.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class TinyLlamaLMPromptGenerator(LMPromptGenerator):
_init_lang_model(): Initializes the language model and tokenizer.
_remove_caption_sentences(text): Removes caption sentences from the generated prompt.
_create_lm_prompt_text(selected_objects): Creates a text prompt for the language model.
generate_prompt(prompt_text): Generates a single prompt using the language model.
_postprocess_prompt(prompt): Post-processes the generated prompt.
generate_prompts_batch(prompt_texts_batch): Generates a batch of prompts using the language model.
"""

def __init__(
Expand Down

0 comments on commit 29cdbb1

Please sign in to comment.