Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion olive/olive_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"supported_providers": [ "CPUExecutionProvider" ],
"supported_accelerators": [ "cpu" ],
"supported_precisions": [ "int4", "int8" ],
"supported_algrithms": [ "gptq" ],
"supported_algorithms": [ "gptq" ],
"supported_quantization_encodings": [ ],
"dataset": "dataset_optional",
"extra_dependencies": [ "inc" ],
Expand Down
2 changes: 1 addition & 1 deletion olive/package_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def import_pass_module(self, pass_type: str):

def get_pass_module_config(self, pass_type: str) -> PassModuleConfig:
if "." in pass_type:
_, module_name = pass_type.rsplit
_, module_name = pass_type.rsplit(".", 1)
return self.get_pass_module_config(module_name)

pass_type = pass_type.lower()
Expand Down
14 changes: 14 additions & 0 deletions test/test_package_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ def test_passes_configuration(self):
assert pass_module_config.module_path
assert pass_module_config.module_path[-len(pass_module_name) :].lower() == pass_module_name
package_config.import_pass_module(pass_module_name)

def test_get_pass_module_config_supports_dotted_path(self):
package_config = OlivePackageConfig.load_default_config()

pass_module_config = package_config.get_pass_module_config("olive.passes.onnx.inc_quantization.IncQuantization")

assert pass_module_config.module_path == "olive.passes.onnx.inc_quantization.IncQuantization"

def test_inc_quantization_supported_algorithms(self):
package_config = OlivePackageConfig.load_default_config()

pass_module_config = package_config.get_pass_module_config("IncQuantization")

assert pass_module_config.supported_algorithms == {"gptq"}
Loading