Skip to content

Commit

Permalink
review: avoid error if transformers-neuronx is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
dacorvo committed Feb 6, 2025
1 parent 677b78b commit 558379f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/exporters/neuron/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def main():
submodels = None
else:
input_shapes, neuron_config_class = get_input_shapes_and_config_class(task, args)
if NeuronDecoderExportConfig in inspect.getmro(neuron_config_class):
if is_transformers_neuronx_available() and NeuronDecoderExportConfig in inspect.getmro(neuron_config_class):
# TODO: warn about ignored args:
# dynamic_batch_size, compiler_workdir, optlevel,
# atol, disable_validation, library_name
Expand Down

0 comments on commit 558379f

Please sign in to comment.