Replies: 1 comment
-
Hi @DingXiangYuanZhiXing, What do you count in the inference time? Only the time to evaluate the user policy? If so, you can do that in plain Python, for example: import time
import ecole
env = ecole.environment.Branching()
instances = ecole.instance.SetCoverGenerator()
for _ in range(10):
obs, action_set, reward_offset, done, info = env.reset(next(instances))
policy_time = 0
while not done:
start = time.perf_counter_ns()
action = policy(obs, action_set)
policy_time += time.perf_counter_ns() - start
obs, action_set, reward, done, info = env.step(action)
# Do something with `policy_time` |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I know how to record
SolvingTime
in here, but I want to record the inference time instead of total solving time.How to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions