llamaIndex - ✅(Solved) Fix docs: placeholder docstrings in public abstract base classes [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
run-llama/llama_index#21188Fetched 2026-04-08 01:45:28
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
cross-referenced ×2closed ×1

The finetune method in multiple abstract base classes (BaseLLMFinetuneEngine, BaseEmbeddingFinetuneEngine, etc.) uses the placeholder docstring "Goes off and does stuff." As these are public interfaces intended to be implemented by other developers, missing documentation about expected behavior, side effects, blocking vs non-blocking execution, and return states makes it difficult to correctly implement custom finetuning engines.

Severity: medium File: llama-index-finetuning/llama_index/finetuning/types.py

Root Cause

The finetune method in multiple abstract base classes (BaseLLMFinetuneEngine, BaseEmbeddingFinetuneEngine, etc.) uses the placeholder docstring "Goes off and does stuff." As these are public interfaces intended to be implemented by other developers, missing documentation about expected behavior, side effects, blocking vs non-blocking execution, and return states makes it difficult to correctly implement custom finetuning engines.

Severity: medium File: llama-index-finetuning/llama_index/finetuning/types.py

PR fix notes

PR #21189: docs(llama-index-finetuning): placeholder docstrings in public abstract base classes

Description (problem / solution / changelog)

Documentation

Problem

The finetune method in multiple abstract base classes (BaseLLMFinetuneEngine, BaseEmbeddingFinetuneEngine, etc.) uses the placeholder docstring "Goes off and does stuff." As these are public interfaces intended to be implemented by other developers, missing documentation about expected behavior, side effects, blocking vs non-blocking execution, and return states makes it difficult to correctly implement custom finetuning engines.

Severity: medium File: llama-index-finetuning/llama_index/finetuning/types.py

Solution

Replace the placeholder docstrings with descriptive documentation explaining the contract of the finetune method.

Changes

  • llama-index-finetuning/llama_index/finetuning/types.py (modified)

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

New Package?

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.

  • I added new unit tests to cover this change
  • I believe this change is already covered by existing unit tests

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran uv run make format; uv run make lint to appease the lint gods Contributed by Lê Thành Chỉnh Code is a tool. Mindset is the real value.

Closes #21188

Changed files

  • llama-index-finetuning/llama_index/finetuning/types.py (modified, +32/-4)

PR #21224: docs: replace placeholder docstrings in finetuning abstract base classes

Description (problem / solution / changelog)

Replaces the "Goes off and does stuff." placeholder in finetune() across all four abstract base classes in llama-index-finetuning/llama_index/finetuning/types.py with proper docstrings describing expected behavior, blocking semantics, and return values.

Fixes #21188

Changed files

  • llama-index-finetuning/llama_index/finetuning/types.py (modified, +60/-8)
RAW_BUFFERClick to expand / collapse

Description

The finetune method in multiple abstract base classes (BaseLLMFinetuneEngine, BaseEmbeddingFinetuneEngine, etc.) uses the placeholder docstring "Goes off and does stuff." As these are public interfaces intended to be implemented by other developers, missing documentation about expected behavior, side effects, blocking vs non-blocking execution, and return states makes it difficult to correctly implement custom finetuning engines.

Severity: medium File: llama-index-finetuning/llama_index/finetuning/types.py

Expected Behavior

The code should handle this case properly to avoid unexpected errors or degraded quality.

extent analysis

Fix Plan

To address the issue, we need to update the docstring for the finetune method in the affected abstract base classes.

Steps

  • Update the finetune method docstring in BaseLLMFinetuneEngine and BaseEmbeddingFinetuneEngine to include:
    • Expected behavior
    • Side effects
    • Blocking vs non-blocking execution
    • Return states
  • Example docstring update:
class BaseLLMFinetuneEngine:
    def finetune(self, ...):
        """
        Finetunes the LLM model.

        Expected behavior:
            - Trains the model on the provided dataset
            - Updates the model weights

        Side effects:
            - Modifies the model weights
            - May modify other model attributes

        Blocking vs non-blocking execution:
            - This method is blocking and will return when training is complete

        Return states:
            - Returns the updated model
            - May raise exceptions on errors

        :return: The updated model
        :raises: Exception on errors
        """
        # method implementation

Verification

To verify the fix, review the updated docstrings and ensure they accurately reflect the expected behavior, side effects, blocking vs non-blocking execution, and return states of the finetune method.

Extra Tips

  • Use tools like Sphinx or Pydoc to generate documentation from the updated docstrings.
  • Consider adding type hints and parameter descriptions to further improve the documentation.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING