-
Notifications
You must be signed in to change notification settings - Fork 58
[module][langchain_mlrun] First version #963
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
base: development
Are you sure you want to change the base?
Conversation
[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
This reverts commit 8872798.
* delete EOS functions * bring back validate_great_expectations * bring back load_dataset
* 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
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Eyal-Danieli
left a comment
There was a problem hiding this 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( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 " |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
| self, | ||
| tools: Sequence[ | ||
| dict[str, Any] | type | Callable | BaseTool # noqa: UP006 | ||
| ], | ||
| *, | ||
| tool_choice: str | None = None, | ||
| **kwargs: Any, |
There was a problem hiding this comment.
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
| self, | |
| tools: Sequence[ | |
| dict[str, Any] | type | Callable | BaseTool # noqa: UP006 | |
| ], | |
| *, | |
| tool_choice: str | None = None, | |
| **kwargs: Any, | |
| * |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not in use
| def reflect_node(state: AgentState): | |
| def reflect_node(): |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| with mlrun_monitoring(settings=manual_mode_settings) as tracer: | |
| with mlrun_monitoring(settings=manual_mode_settings): |
There was a problem hiding this comment.
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
Eyal-Danieli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plus add copyright
omermaim
left a comment
There was a problem hiding this 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
Created the module
langchain_mlrun- MLRun's integration with LangChain, allowing to auto-trace and monitor LangChain and LangGraph based code.