Skip to content

Commit

Permalink
bug fix to assertion on target modules
Browse files Browse the repository at this point in the history
Signed-off-by: 1000850000 user <aaron.chew1@ibm.com>
  • Loading branch information
achew010 committed Sep 6, 2024
1 parent ed89921 commit fc7c118
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/accelerated-peft/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fms-acceleration-peft"
version = '0.2.0.dev'
version = '0.2.1'
description = "FMS Acceleration for PeFT"
authors = [
{name = "Fabian Lim", email = "flim@sg.ibm.com"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@

def requires_installation_on_all_linears(peft_config):
tm = peft_config.target_modules
assert isinstance(tm, (list, str)), "target modules can only be list or string"
if isinstance(tm, list):
assert isinstance(tm, (list, set, str)), "target modules can only be list, set or string"
if isinstance(tm, (list, set)):
if PEFT_ALL_LINEAR not in tm:
return False
assert len(tm) == 1, f"`{PEFT_ALL_LINEAR}` must exist alone in target modules"
Expand Down

0 comments on commit fc7c118

Please sign in to comment.