Skip to content

Updated base_model.py #575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

krakken190
Copy link


name: Pull Request
title: Fix UnboundLocalError in BaseModel.download
assignees: 'BAAI-OpenPlatform,ftgreat'


Description

This PR addresses the UnboundLocalError: local variable 'model_id' referenced before assignment that occurs within the BaseModel.download method. The error was caused by the model_id variable being used in a conditional check before it was guaranteed to be assigned a value.

This PR adds a debugging print statement to inspect the value of model_id before the conditional check, and ensures that the variable is assigned within a try except block.

Checklist

  • bug fixed
  • new feature provided
  • documentation updated
  • tests added

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.

1 participant