Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] inf2 pipeline fix for adapter unsupported #1927

Merged
merged 1 commit into from
May 17, 2024

Conversation

tosterberg
Copy link
Contributor

Description

Add logic to ensure that when adapters are not supported that parse input still passes

  • If this change is a backward incompatible change, why must this change be made?
  • Interesting edge cases to note here

@tosterberg tosterberg requested review from zachgk, frankfliu and a team as code owners May 17, 2024 16:42
@tosterberg tosterberg merged commit 6d1ce20 into deepjavalibrary:master May 17, 2024
8 checks passed
@tosterberg tosterberg deleted the fix-inf2 branch May 17, 2024 17:03
found_adapters = found_adapter_per_item or found_adapters
if input_format_configs.is_adapters_supported:
adapters.extend(adapters_per_item)
found_adapters = found_adapter_per_item or found_adapters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is found_adapters supposed to be doing something here on the right-hand side? It's set to False at the top of this function, and then this is its first use.

Just wanted to make sure this isn't some kind of bug that crept in at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohithkrn It looks like this was introduced in #1920. It looks like this was moved outside of the try catch per this discussion with David.

nit: I think adapters.extend and updating found_adapters should happen outside the try-except, to make it clearer that these state variables only get updated if we make it past the continue in except.

@davidthomas426 It looks like we are just getting a bool signaling if we have found an adapter or if it was set to true when calling this method, found_adapters is then passed to ParsedInput. I do think this is a little hard to read but it also isn't immediately clear what the rewrite would look like to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I missed the check after moving outside the try block. found_adapters is used in the handler to determine whether adapter_data should be added to the Request object in the rolling batch inference. It is used to completely avoid processing adapters in the non-lora case. We can remove it as well set adapters for each request to None for non lora case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants