-
Notifications
You must be signed in to change notification settings - Fork 7.4k
[rllib] valuation script tryies to convert pytorch cuda tensor to numpy #8688
Copy link
Copy link
Closed
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalbugSomething that is supposed to be working; but isn'tSomething that is supposed to be working; but isn't
Description
When using rllib and turning on evaluation, rllib tries to convert pytorch cuda tensor to numpy and fails with exception "TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first."
Simple reproduced script:
from ray import tune
from ray.rllib.agents.dqn import ApexTrainer
ray.init()
tune.run(
ApexTrainer,
stop={"episode_reward_mean": 20000},
config={
"env": "SpaceInvaders-v0",
"num_gpus": 1,
"num_workers": 16,
"use_pytorch": True,
"evaluation_interval": 1,
},
)Is that really a bug or am I doing something wrong? Any workarounds?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalbugSomething that is supposed to be working; but isn'tSomething that is supposed to be working; but isn't