-
Notifications
You must be signed in to change notification settings - Fork 667
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(watsonx): exclude http request, adding span for model initialization #543
fix(watsonx): exclude http request, adding span for model initialization #543
Conversation
WatsonxInstrumentor().instrument() | ||
try: | ||
# Check for required package in the env, skip test if could not found | ||
from ibm_watsonx_ai.foundation_models import ModelInference |
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.
don't we need to add them to poetry otherwise they won't get installed in the test?
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.
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.
Hmm we need to see if poetry supports that but I think now this test never gets run
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.
@nirga test execution in CI looks good to me. It skips watsonx test on Python < 3.10, but runs normally otherwise. Traceloop SDK tests are running for all versions.
I think this is a good solution.
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.
@paolorechia but how does it run if the Watson package is not installed? 🤔
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.
Aha! It's only running the try/catch, and exiting on the except then? I missed that.
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.
Yep 😅
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.
OK, but at least the @huang-cn is able to run tests locally now.
Do you think we might need to revive the optional dependencies issue I created but closed? Maybe it's a way forward for these issues. I don't think it's reasonable to request the PR author to implement a fix for this though.
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.
Yeah let's merge it, open an issue and figure out if there's a way around it within poetry
|
||
|
||
@pytest.mark.skipif(sys.version_info < (3, 10), reason="ibm-watson-ai requires python3.10") |
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.
👍 nice way to skip it
WatsonxInstrumentor().instrument() | ||
try: | ||
# Check for required package in the env, skip test if could not found | ||
from ibm_watsonx_ai.foundation_models import ModelInference |
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.
@nirga test execution in CI looks good to me. It skips watsonx test on Python < 3.10, but runs normally otherwise. Traceloop SDK tests are running for all versions.
I think this is a good solution.
feat(instrumentation): ...
orfix(instrumentation): ...
.issue related discussions in #542
EXCLUDED_URLS
in traceloop-sdk tracing