MCPcopy Index your code
hub / github.com/InternLM/lmdeploy / Session

Class Session

lmdeploy/profiler.py:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9class Session:
10
11 UNKNOWN = 0
12 SUCCESS = 1
13 FAIL = 2
14
15 def __init__(self, input_len, req_output_len):
16 self.ts = []
17 self.ns = []
18 self.input_len = input_len
19 self.req_output_len = req_output_len
20 self.status = Session.UNKNOWN
21
22 def tick(self, n_token):
23 self.ts.append(time.perf_counter())
24 self.ns.append(n_token)
25
26 def finish(self, status):
27 self.status = status
28
29
30class Profiler:

Callers 1

new_sessionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected