Skip to content

Commit

Permalink
Try another way
Browse files Browse the repository at this point in the history
  • Loading branch information
baijumeswani committed Jan 7, 2025
1 parent 7c48740 commit 1d14214
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion src/models/extra_inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void PresetExtraInputs::Add() {
extra_inputs_.push_back(it->second());
state_.input_names_.push_back(extra_input_names_.back().c_str());
state_.inputs_.push_back(extra_inputs_.back().get());
} else if (std::string prefix("onnx::Neg_"); std::mismatch(prefix.begin(), prefix.end(), input_name.begin()).first == prefix.end()) {
} else if (input_name.rfind("onnx::Neg_", 0) == 0) {
// The unclaimed input has a prefix of onnx::Neg_, which is a special case
// We treat this as an alias to num_logits_to_keep
extra_input_names_.push_back(input_name);
Expand Down
3 changes: 0 additions & 3 deletions test/python/test_onnxruntime_genai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,6 @@ def _export_adapter(adapter, adapter_file_name):
def test_preset_extra_inputs(device, phi2_for, extra_inputs):
def _prepare_model(extra_inputs_model_path):
phi2_model_path = phi2_for(device)
if os.path.exists(extra_inputs_model_path):
shutil.rmtree(extra_inputs_model_path)

shutil.copytree(phi2_model_path, extra_inputs_model_path)

# Create the model with the extra inputs
Expand Down

0 comments on commit 1d14214

Please sign in to comment.