Skip to content

Conversation

@guy1992l
Copy link
Member

@guy1992l guy1992l commented Jan 8, 2026

Created the module langchain_mlrun - MLRun's integration with LangChain, allowing to auto-trace and monitor LangChain and LangGraph based code.

  • Added the module itself - fully documented and sphinx ready.
  • Added about 76 tests for 100% of the current functionality.
  • Added an end-to-end notebook with brief explanations and tutorial.
  • Made preparations for MLRun-CE support (using Kafka stream).
  • Wrote TODOs for future work.

yonishelach and others added 30 commits March 8, 2023 11:01
[Build] Fix html links, add <function>.html as source in documentation
[XGB-Custom] Fix test artifact key name
[XGB-Serving][XGB-Test][XGB-Trainer] Fix tests - artifact key
* [Build] Install python 3.9 when testing

* [Build] Update python version in CI

* .
* [Build] Build with python 3.9

* .
* [Noise-reduction] Add new function to hub

* fix test

* added multiprocessing and silence removal to function
* delete EOS functions

* bring back validate_great_expectations

* bring back load_dataset
Eyal-Danieli and others added 16 commits September 25, 2024 15:53
* adjust batch infer v2

* update docs in NB
* [text to audio generator] Replaced bark with openai tts models

* [text to audio generator] Fix base url env var

* fix version

* Add speech engine

* after review
* [Build] Fix html links, Add <function>.html as source in documentation

* Update CI temporarily and update index

* [XGB-Custom] Fix test artifact key name

* [XGB-Serving][XGB-Test][XGB-Trainer] Fix tests - artifact key

* [Build] Install python 3.9 when testing (mlrun#618)

* [Build] Update python version in CI (mlrun#620)

* [Build] Install python 3.9 when testing

* [Build] Update python version in CI

* .

* Revert "[Build] Update python version in CI (mlrun#620)" (mlrun#621)

This reverts commit 0cd1f15.

* Revert "[Build] Install python 3.9 when testing (mlrun#618)" (mlrun#619)

This reverts commit 3301415.

* [Build] Build with python 3.9 (mlrun#622)

* [Build] Build with python 3.9

* .

* Update requirements.txt
* fix feature_selection

* fix feature_selection

* fix feature_selection nb

* update yaml name

* fix test

* fix test
* fix arbitrary file vulnerability

* fix arbitrary file vulnerability

* fix test
* add traversal test

* add traversal test

* add traversal test
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@guy1992l guy1992l requested a review from Copilot January 8, 2026 22:50
@guy1992l guy1992l requested review from Eyal-Danieli and omermaim and removed request for Copilot January 8, 2026 22:50
Copy link
Member

@Eyal-Danieli Eyal-Danieli left a comment

Choose a reason for hiding this comment

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

very nice, had few comments

:returns: An MLRun model endpoint monitoring client.
"""
if mlrun.mlconf.is_ce_mode():
return _KafkaMLRunEndPointClient(
Copy link
Member

Choose a reason for hiding this comment

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

missing monitoring_broker and monitoring_topic params

Copy link
Member Author

Choose a reason for hiding this comment

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

its a "hachana lemazgan"... there is a TODO basically anywhere related to Kafka usage.

) from value_error
except ImportError as import_error:
raise ImportError(
f"Could not import '{module_path}'. Tried to import '{module_name}' and failed with the following "
Copy link
Member

Choose a reason for hiding this comment

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

module_name might be referenced before assignment (also object_name in the next error)

Copy link
Member Author

Choose a reason for hiding this comment

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

its not, Import Error cannot be raised during split so the module name is there, same for object name.

Comment on lines +54 to +60
self,
tools: Sequence[
dict[str, Any] | type | Callable | BaseTool # noqa: UP006
],
*,
tool_choice: str | None = None,
**kwargs: Any,
Copy link
Member

Choose a reason for hiding this comment

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

didn't find any usage for that func

Suggested change
self,
tools: Sequence[
dict[str, Any] | type | Callable | BaseTool # noqa: UP006
],
*,
tool_choice: str | None = None,
**kwargs: Any,
*

Copy link
Member Author

Choose a reason for hiding this comment

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

It is used under the hood by create_agent in LangChain.

response = model.invoke(state["messages"])
return {"messages": [response], "attempts": state["attempts"] + 1}

def reflect_node(state: AgentState):
Copy link
Member

Choose a reason for hiding this comment

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

not in use

Suggested change
def reflect_node(state: AgentState):
def reflect_node():

Copy link
Member Author

Choose a reason for hiding this comment

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

That's the nodes pattern in LangGraph. I want to mimic real flow.

"""
run_func, expected_events = run_suites

with mlrun_monitoring(settings=manual_mode_settings) as tracer:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
with mlrun_monitoring(settings=manual_mode_settings) as tracer:
with mlrun_monitoring(settings=manual_mode_settings):

Copy link
Member Author

Choose a reason for hiding this comment

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

it is used like 2 rows ahead in 451:

assert len(tracer.settings.monitor.debug_target_list) == expected_events

Copy link
Member

@Eyal-Danieli Eyal-Danieli left a comment

Choose a reason for hiding this comment

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

plus add copyright

@guy1992l guy1992l requested a review from Eyal-Danieli January 11, 2026 21:30
Copy link

@omermaim omermaim left a comment

Choose a reason for hiding this comment

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

looks good to me

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.

6 participants