Skip to content

Commit 9b2efe2

Browse files
author
Hao Ni (CSI Interfusion Co Ltd)
committed
remove __getstate__ and __setstate__ in tracet
1 parent 689a6d4 commit 9b2efe2

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

agentlightning/tracer/agentops.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,6 @@ def __init__(self, *, agentops_managed: bool = True, instrument_managed: bool =
6161
if not self.instrument_managed:
6262
logger.warning("instrument_managed=False. You are responsible for all instrumentation.")
6363

64-
def __getstate__(self):
65-
state = self.__dict__.copy()
66-
return state
67-
68-
def __setstate__(self, state: Any):
69-
self.__dict__.update(state)
70-
7164
def instrument(self, worker_id: int):
7265
instrument_all()
7366

@@ -168,7 +161,7 @@ def _trace_context_sync(
168161
raise ValueError("store, rollout_id, and attempt_id must be either all provided or all None")
169162
except Exception as e:
170163
status = StatusCode.ERROR # type: ignore
171-
logger.debug(f"Trace failed for rollout_id={rollout_id}, attempt_id={attempt_id}, error={e}")
164+
logger.error(f"Trace failed for rollout_id={rollout_id}, attempt_id={attempt_id}, error={e}")
172165
finally:
173166
agentops.end_trace(trace, end_state=status) # type: ignore
174167

0 commit comments

Comments
 (0)