Skip to content

output model name suffix#326

Merged
xiaoyifan merged 1 commit intomainfrom
output-model-name
Nov 10, 2025
Merged

output model name suffix#326
xiaoyifan merged 1 commit intomainfrom
output-model-name

Conversation

@xiaoyifan
Copy link
Collaborator

@xiaoyifan xiaoyifan commented Nov 10, 2025

execute the create RFT again, users will see the issue of output model exists, adding a uuid based suffix to differentiate


name: Pull Request
about: Propose changes to the codebase
title: "Brief description of changes"
labels: ''
assignees: ''


Description

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

Fixes # (issue)
Implements # (issue)

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
  • Refactoring/Code cleanup
  • Build/CI/CD related changes
  • Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project (ran black ., isort ., flake8 .)
  • 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
  • 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
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Screenshots (if applicable)

If applicable, add screenshots to help showcase your changes.

Additional context

Add any other context about the PR here.


Note

Add a short UUID suffix to the default RFT output model name and export the helper.

  • RFT output model naming:
    • Update build_default_output_model to append a 4-char UUID suffix (via uuid.uuid4()) to "{base}-rft-..." to avoid name collisions.
  • Exports:
    • Add build_default_output_model and _map_api_host_to_app_host to __all__.
  • Misc:
    • Import uuid.

Written by Cursor Bugbot for commit 3861ecb. This will update automatically on new commits. Configure here.

def build_default_output_model(evaluator_id: str) -> str:
base = evaluator_id.lower().replace("_", "-")
return f"{base}-rft"
uuid_suffix = str(uuid.uuid4())[:4]
Copy link

Choose a reason for hiding this comment

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

Bug: UUID Truncation: A Collision Course

Taking only the first 4 characters from uuid.uuid4() provides only 65,536 possible values (16^4), which creates a high collision risk. The birthday paradox means collisions become likely after just a few hundred model creations, reintroducing the "output model exists" errors this change aims to prevent. Using uuid.uuid4().hex[:8] or the full hex would provide better uniqueness.

Fix in Cursor Fix in Web

@xiaoyifan xiaoyifan merged commit 0102469 into main Nov 10, 2025
9 checks passed
@xiaoyifan xiaoyifan deleted the output-model-name branch November 10, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants