Skip to content
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

CLI: Use getattr on conditional args, Check handler type. Debug log in get_attr #1486

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jambayk
Copy link
Contributor

@jambayk jambayk commented Nov 14, 2024

Describe your changes

CLI:

  • For command arguments like task, adapter_path, and trust_remote_code, use getattr to avoid AttributeError in case the handler type is not supported.
  • Add assertions in the commands to ensure the expected model handler type is provided

utils:

  • get_attr logs a debug message instead of a warning message. This util is used to find optional submodules so we should not log as warning.

workflow.run:

  • default passes to an empty dict. Otherwise, some other code tries to use dict methods on None.
     

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.
  • Is this PR including examples changes? If yes, please remember to update example documentation in a follow-up PR.

(Optional) Issue link

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