Skip to content

Commit dfa1829

Browse files
fmt
Signed-off-by: Thara Palanivel <[email protected]>
1 parent 026201a commit dfa1829

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

fms_mo/utils/dq_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def config_quantize_smooth_layers(qcfg):
3838
"granite-20b-code",
3939
"granite-20b-code",
4040
]
41-
if any(model in qcfg["model"] for model in llama_architecture) or any(model in qcfg["model_type"] for model in llama_architecture):
41+
if any(model in qcfg["model"] for model in llama_architecture) or any(
42+
model in qcfg["model_type"] for model in llama_architecture
43+
):
4244
qcfg["qlayer_name_pattern"] = ["model.layers."]
4345
qcfg["scale_layers"] = ["k_proj", "v_proj", "gate_proj", "up_proj"]
4446
qcfg["qskip_layer_name"] = []

fms_mo/utils/logging_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def set_log_level(log_level=None, logger_name=None):
4040
# Configure Python native logger
4141
# If CLI arg is passed, assign same log level to python native logger
4242
log_level = log_level or os.environ.get("LOG_LEVEL", "WARNING")
43-
43+
4444
logging.basicConfig(
4545
format="%(levelname)s:%(filename)s:%(message)s", level=log_level.upper()
4646
)

tests/artifacts/testdata/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""Helpful datasets for configuring individual unit tests.
16-
"""
15+
"""Helpful datasets for configuring individual unit tests."""
16+
1717
# Standard
1818
import os
1919

tests/test_run_quant.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
)
3535
from tests.artifacts.testdata import MODEL_NAME, WIKITEXT_TOKENIZED_DATA_JSON
3636

37-
MODEL_ARGS = ModelArguments(
38-
model_name_or_path=MODEL_NAME, torch_dtype="float16"
39-
)
37+
MODEL_ARGS = ModelArguments(model_name_or_path=MODEL_NAME, torch_dtype="float16")
4038
DATA_ARGS = DataArguments(
4139
training_data_path=WIKITEXT_TOKENIZED_DATA_JSON,
4240
)
@@ -73,7 +71,7 @@ def test_run_train_fails_training_data_path_not_exist():
7371
"""Check fails when data path not found."""
7472
updated_data_path_args = copy.deepcopy(DATA_ARGS)
7573
updated_data_path_args.training_data_path = "fake/path"
76-
with pytest.raises(FileNotFoundError): # TPP Should this be FileNotFoundError or ValueError?
74+
with pytest.raises(FileNotFoundError):
7775
quantize(
7876
model_args=MODEL_ARGS,
7977
data_args=updated_data_path_args,

0 commit comments

Comments
 (0)