Skip to content

Commit

Permalink
add one more check in get_framework
Browse files Browse the repository at this point in the history
Signed-off-by: Yu Chin Fabian Lim <[email protected]>
  • Loading branch information
fabianlim committed Jun 20, 2024
1 parent 3e2b7c5 commit 8de651c
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,14 @@ def get_framework(self):
self.to_yaml(f.name)
return AccelerationFramework(f.name)
else:
raise ValueError(
"No acceleration framework package found. To use, first "
"ensure that 'pip install -e.[fms-accel]' is done first to "
"obtain the acceleration framework dependency. Additional "
"acceleration plugins make be required depending on the requsted "
"acceleration. See README.md for instructions."
)
if len(self.to_dict()) > 0:
raise ValueError(
"No acceleration framework package found. To use, first "
"ensure that 'pip install -e.[fms-accel]' is done first to "
"obtain the acceleration framework dependency. Additional "
"acceleration plugins make be required depending on the requsted "
"acceleration. See README.md for instructions."
)

def to_dict(self):
"""convert a valid AccelerationFrameworkConfig dataclass into a schema-less dictionary
Expand Down

0 comments on commit 8de651c

Please sign in to comment.