Skip to content

Commit

Permalink
add changes required by linter
Browse files Browse the repository at this point in the history
Signed-off-by: Max de Bayser <[email protected]>
  • Loading branch information
maxdebayser authored and flaviabeo committed Nov 6, 2024
1 parent f0ccb8c commit cc6da45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/fp8/quantizer/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def calibrate_loop():

def main(args):
if not torch.cuda.is_available():
raise EnvironmentError("GPU is required for inference.")
raise OSError("GPU is required for inference.")

random.seed(RAND_SEED)
np.random.seed(RAND_SEED)
Expand Down Expand Up @@ -314,7 +314,7 @@ def main(args):

# Workaround for wo quantization
if args.qformat in ["int8_wo", "int4_wo", "full_prec"]:
with open(f"{export_path}/config.json", 'r') as f:
with open(f"{export_path}/config.json") as f:
tensorrt_llm_config = json.load(f)
if args.qformat == "int8_wo":
tensorrt_llm_config["quantization"]["quant_algo"] = 'W8A16'
Expand Down
2 changes: 1 addition & 1 deletion vllm/transformers_utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def get_hf_file_to_dict(file_name: str,
return None
file_path = Path(hf_hub_file)

with open(file_path, "r") as file:
with open(file_path) as file:
return json.load(file)
return None

Expand Down

0 comments on commit cc6da45

Please sign in to comment.