Skip to content

Commit 24018c6

Browse files
Task/remove dynamic retries (#1941)
* Remove max retries. Update Typer args * Format * Semver * Fix typo * Ruff and Typos * Format
1 parent 36948b8 commit 24018c6

File tree

13 files changed

+393
-335
lines changed

13 files changed

+393
-335
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "minor",
3+
"description": "Remove Dynamic Max Retries support. Refactor typer typing in cli interface"
4+
}

graphrag/api/prompt_tune.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pydantic import PositiveInt, validate_call
1818

1919
from graphrag.callbacks.noop_workflow_callbacks import NoopWorkflowCallbacks
20-
from graphrag.config.defaults import graphrag_config_defaults, language_model_defaults
20+
from graphrag.config.defaults import graphrag_config_defaults
2121
from graphrag.config.models.graph_rag_config import GraphRagConfig
2222
from graphrag.language_model.manager import ModelManager
2323
from graphrag.logger.base import ProgressLogger
@@ -109,15 +109,6 @@ async def generate_indexing_prompts(
109109
logger.info("Retrieving language model configuration...")
110110
default_llm_settings = config.get_language_model_config(PROMPT_TUNING_MODEL_ID)
111111

112-
# if max_retries is not set, inject a dynamically assigned value based on the number of expected LLM calls
113-
# to be made or fallback to a default value in the worst case
114-
if default_llm_settings.max_retries < -1:
115-
default_llm_settings.max_retries = min(
116-
len(doc_list), language_model_defaults.max_retries
117-
)
118-
msg = f"max_retries not set, using default value: {default_llm_settings.max_retries}"
119-
logger.warning(msg)
120-
121112
logger.info("Creating language model...")
122113
llm = ModelManager().register_chat(
123114
name="prompt_tuning",

0 commit comments

Comments
 (0)