Skip to content

Enhance error handling and update workflows#46

Merged
suzukimain merged 2 commits intomasterfrom
update-v8
Dec 16, 2025
Merged

Enhance error handling and update workflows#46
suzukimain merged 2 commits intomasterfrom
update-v8

Conversation

@suzukimain
Copy link
Copy Markdown
Owner

Improve error handling in the search_huggingface function to better manage candidate selection and exceptions. Update the GitHub Actions workflows by removing the debug workflow and enhancing the maintenance workflow with conditional checkout.

Copilot AI review requested due to automatic review settings December 16, 2025 07:20
@suzukimain suzukimain merged commit 7ca7678 into master Dec 16, 2025
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances error handling in the search_huggingface function and updates GitHub Actions workflows. The main improvement is a more robust candidate selection mechanism that tries multiple model options when the preferred choice is unavailable, with better handling of 401 Unauthorized errors. The workflow changes remove the debug workflow and improve the maintenance workflow with conditional checkout logic.

  • Implements a candidate-based retry mechanism that collects all valid models before attempting downloads
  • Adds URL validation with HEAD requests before downloads to detect 401 errors early
  • Updates the PyPI check workflow to test the published package instead of source code
  • Enhances the maintenance workflow with conditional repository checkout

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/auto_diffusers/pipeline_easy.py Refactors the search logic to collect all candidates first, then try each one with improved exception handling and 401 error tracking
.github/workflows/pypi-check.yml Renames from "Operation Debug (Source)" to "PyPI Package Check" and tests the PyPI-published package
.github/workflows/maintenance.yml Makes checkout unconditional but with a conditional ref expression for workflow_dispatch vs scheduled runs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

except Exception as e:
logger.info(f"Failed to get repo info for {repo_id}: {e}")
continue

Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

This line contains trailing whitespace. Consider removing it for consistency with code style.

Suggested change

Copilot uses AI. Check for mistakes.
if diffusers_model_exists or file_list:
break
else:

Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

This line contains trailing whitespace. Consider removing it for consistency with code style.

Suggested change

Copilot uses AI. Check for mistakes.
if last_error:
error_msg += f" Last error: {last_error}"
raise ValueError(error_msg)

Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

This line contains trailing whitespace. Consider removing it for consistency with code style.

Suggested change

Copilot uses AI. Check for mistakes.
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