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: Refactor DataFilterComponent inputs #4524

Merged
merged 3 commits into from
Nov 13, 2024
Merged

Conversation

anovazzi1
Copy link
Contributor

This pull request refactors the inputs of the DataFilterComponent to use the StrInput class instead of the MessageInput class. The StrInput class is more appropriate for handling string inputs, and this change improves the clarity and consistency of the code.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Nov 12, 2024
@github-actions github-actions bot added the bug Something isn't working label Nov 12, 2024
Copy link

codspeed-hq bot commented Nov 12, 2024

CodSpeed Performance Report

Merging #4524 will degrade performances by 14.46%

Comparing updateDataFilterComponent (5093404) with main (be44183)

Summary

❌ 1 regressions
✅ 14 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main updateDataFilterComponent Change
test_successful_run_with_input_type_any 455.3 ms 532.3 ms -14.46%

Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

Also, you can use the Component tests with this one. We can merge it after #4526

),
MessageInput(
StrInput(
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
StrInput(
MessageTextInput(

@@ -1,7 +1,7 @@
from typing import Any

from langflow.custom import Component
from langflow.io import DataInput, DropdownInput, MessageInput, Output
from langflow.io import DataInput, DropdownInput, Output, StrInput
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
from langflow.io import DataInput, DropdownInput, Output, StrInput
from langflow.io import DataInput, DropdownInput, Output, MessageTextInput

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 12, 2024
@ogabrielluiz ogabrielluiz enabled auto-merge (squash) November 12, 2024 20:56
@ogabrielluiz ogabrielluiz merged commit 8e0d6d5 into main Nov 13, 2024
28 of 37 checks passed
@ogabrielluiz ogabrielluiz deleted the updateDataFilterComponent branch November 13, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants