langflow icon indicating copy to clipboard operation
langflow copied to clipboard

refactor(calculator): update tool implementation and fix deprecation warnings

Open Vigtu opened this issue 1 year ago • 1 comments

refactor(calculator): update tool implementation and fix deprecation warnings

  • Replace legacy tool mode implementation using CalculatorToolSchema with simplified tool_mode=True approach.
  • Fix ast.Num deprecation warnings by supporting ast.Constant while maintaining backwards compatibility.

image image

Vigtu avatar Dec 25 '24 19:12 Vigtu

@carlosrcoelho

Vigtu avatar Dec 30 '24 12:12 Vigtu

LGTM

edwinjosechittilappilly avatar Jan 09 '25 20:01 edwinjosechittilappilly

CodSpeed Performance Report

Merging #5442 will degrade performances by 32.87%

Comparing Vigtu:calculator-overhaul (bf0e59f) with main (3193804)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 13 untouched benchmarks

:warning: Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main Vigtu:calculator-overhaul Change
test_successful_run_with_input_type_text 4,243.8 ms 249.4 ms ×17
test_successful_run_with_output_type_debug 167.3 ms 249.3 ms -32.87%

codspeed-hq[bot] avatar Jan 09 '25 20:01 codspeed-hq[bot]

@Vigtu can you check and fix why the unit test are failing?

edwinjosechittilappilly avatar Jan 10 '25 16:01 edwinjosechittilappilly

tests with the component calculator as tool is failing!

edwinjosechittilappilly avatar Jan 10 '25 16:01 edwinjosechittilappilly

@Vigtu We are compiling few guidelines for component refactor PR. Will let you know further details once its ready!

edwinjosechittilappilly avatar Jan 10 '25 18:01 edwinjosechittilappilly

edit test cases to use calculator component tool.

Working on this! Thank you

Vigtu avatar Jan 15 '25 13:01 Vigtu

@Vigtu can we get these changes in by Today (friday) ? Please let me know if there are any blockers!

edwinjosechittilappilly avatar Jan 17 '25 06:01 edwinjosechittilappilly

@Vigtu can we get these changes in by Today (friday) ? Please let me know if there are any blockers!

Done

Vigtu avatar Jan 17 '25 14:01 Vigtu