mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-07 22:11:51 +00:00
infra: add print rule to ruff (#16221)
Added noqa for existing prints. Can slowly remove / will prevent more being intro'd
This commit is contained in:
@@ -646,9 +646,11 @@ class MlflowCallbackHandler(BaseMetadataCallbackHandler, BaseCallbackHandler):
|
||||
{
|
||||
"page_content": doc.page_content,
|
||||
"metadata": {
|
||||
k: str(v)
|
||||
if not isinstance(v, list)
|
||||
else ",".join(str(x) for x in v)
|
||||
k: (
|
||||
str(v)
|
||||
if not isinstance(v, list)
|
||||
else ",".join(str(x) for x in v)
|
||||
)
|
||||
for k, v in doc.metadata.items()
|
||||
},
|
||||
}
|
||||
@@ -757,15 +759,15 @@ class MlflowCallbackHandler(BaseMetadataCallbackHandler, BaseCallbackHandler):
|
||||
langchain_asset.save_agent(langchain_asset_path)
|
||||
self.mlflg.artifact(langchain_asset_path)
|
||||
except AttributeError:
|
||||
print("Could not save model.")
|
||||
print("Could not save model.") # noqa: T201
|
||||
traceback.print_exc()
|
||||
pass
|
||||
except NotImplementedError:
|
||||
print("Could not save model.")
|
||||
print("Could not save model.") # noqa: T201
|
||||
traceback.print_exc()
|
||||
pass
|
||||
except NotImplementedError:
|
||||
print("Could not save model.")
|
||||
print("Could not save model.") # noqa: T201
|
||||
traceback.print_exc()
|
||||
pass
|
||||
if finish:
|
||||
|
Reference in New Issue
Block a user