Skip to content

Commit

Permalink
cleaned
Browse files Browse the repository at this point in the history
  • Loading branch information
JingyaHuang committed Dec 13, 2024
1 parent 222f908 commit c96dcd0
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions optimum/exporters/neuron/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ def validate_models_outputs(
else output_dir.joinpath(model_name + ".neuron")
)
neuron_paths.append(neuron_model_path)
# try:
logger.info(f"Validating {model_name} model...")
validate_model_outputs(
config=sub_neuron_config,
reference_model=ref_submodel,
neuron_model_path=neuron_model_path,
neuron_named_outputs=neuron_named_outputs[model_name],
atol=atol,
)
# except Exception as e:
# exceptions.append(f"Validation of {model_name} fails: {e}")
try:
logger.info(f"Validating {model_name} model...")
validate_model_outputs(
config=sub_neuron_config,
reference_model=ref_submodel,
neuron_model_path=neuron_model_path,
neuron_named_outputs=neuron_named_outputs[model_name],
atol=atol,
)
except Exception as e:
exceptions.append(f"Validation of {model_name} fails: {e}")

if len(exceptions) != 0:
for i, exception in enumerate(exceptions[:-1]):
Expand Down Expand Up @@ -352,8 +352,6 @@ def export_models(
total_compilation_time = 0
compile_configs = {}
for i, model_name in enumerate(models_and_neuron_configs.keys()):
# if model_name in ["text_encoder", "transformer", "vae_encoder"]:
# continue
logger.info(f"***** Compiling {model_name} *****")
submodel, sub_neuron_config = models_and_neuron_configs[model_name]
output_file_name = (
Expand Down

0 comments on commit c96dcd0

Please sign in to comment.