这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@xliu0105
Copy link

The get_model_config function in tuners_utils.py does not handle model_config of dataclass data type, because some models (such as the lerobot model) have config attributes, but the dataclass type cannot be converted into a dictionary in the get_model_config function, resulting in an error when using .get in the _get_tied_target_modules function.

I fixed this problem. Make peft adapt to a wider range of model types.

@githubnemo
Copy link
Collaborator

Yes, I planned to do this as a follow-up to a potential discussion of huggingface/lerobot#1411 but I think it doesn't hurt to support dataclasses as model config objects, especially since the change is not that big.

Could you just add a unit test for this case in tests/test_config.py? We could simply test that get_model_config returns a dictionary given a model with a dataclass config.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@githubnemo
Copy link
Collaborator

@xliu0105 are you still interested in implementing this?

@github-actions
Copy link

github-actions bot commented Sep 5, 2025

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

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