There seem to be some issues with getting the environment set up. I tried two installation methods.
I tried building an environment from scratch, with two separate machines with different GPUs, all getting the same error as follows:
Traceback (most recent call last):
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/leanrl/ppo_atari_envpool_torchcompile.py", line 378, in <module>
next_obs, next_done, container = rollout(next_obs, next_done, avg_returns=avg_returns)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/leanrl/ppo_atari_envpool_torchcompile.py", line 207, in rollout
next_obs, reward, next_done, action, logprob, value = act_and_step_func(obs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/eval_frame.py", line 465, in _fn
return fn(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/leanrl/ppo_atari_envpool_torchcompile.py", line 193, in act_and_step_func
action, logprob, _, value = policy(obs=obs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1292, in __call__
return self._torchdynamo_orig_callable(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 1087, in __call__
result = self._inner_convert(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 530, in __call__
return _compile(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 933, in _compile
guarded_code = compile_inner(code, one_graph, hooks, transform)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 675, in compile_inner
return _compile_inner(code, one_graph, hooks, transform)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_utils_internal.py", line 87, in wrapper_function
return function(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 708, in _compile_inner
out_code = transform_code_object(code, transform)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/bytecode_transformation.py", line 1322, in transform_code_object
transformations(instructions, code_options)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 220, in _fn
return fn(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 643, in transform
tracer.run()
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2776, in run
super().run()
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 979, in run
while self.step():
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 891, in step
self.dispatch_table[inst.opcode](self, inst)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 569, in wrapper
return inner_fn(self, inst)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1598, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 826, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/user_defined.py", line 938, in call_function
return self.call_method(tx, "__call__", args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/user_defined.py", line 798, in call_method
return UserMethodVariable(method, self, source=source).call_function(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 400, in call_function
return super().call_function(tx, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 339, in call_function
return super().call_function(tx, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/functions.py", line 111, in call_function
return tx.inline_user_function_return(self, [*self.self_args(), *args], kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 832, in inline_user_function_return
return InliningInstructionTranslator.inline_call(self, fn, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2991, in inline_call
return cls.inline_call_(parent, func, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 3119, in inline_call_
tracer.run()
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 979, in run
while self.step():
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 891, in step
self.dispatch_table[inst.opcode](self, inst)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 569, in wrapper
return inner_fn(self, inst)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1676, in CALL_FUNCTION_EX
self.call_function(fn, argsvars.items, kwargsvars)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 826, in call_function
self.push(fn.call_function(self, args, kwargs)) # type: ignore[arg-type]
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/lazy.py", line 156, in realize_and_forward
return getattr(self.realize(), name)(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/torch.py", line 953, in call_function
tensor_variable = wrap_fx_proxy(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2045, in wrap_fx_proxy
return wrap_fx_proxy_cls(target_cls=TensorVariable, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/variables/builder.py", line 2132, in wrap_fx_proxy_cls
example_value = get_fake_value(proxy.node, tx, allow_non_graph_fake=True)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2103, in get_fake_value
raise TorchRuntimeError(str(e)).with_traceback(e.__traceback__) from None
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2038, in get_fake_value
ret_val = wrap_fake_exception(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 1595, in wrap_fake_exception
return fn()
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2039, in <lambda>
lambda: run_node(tx.output, node, args, kwargs, nnmodule)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2171, in run_node
raise RuntimeError(make_error_message(e)).with_traceback(
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_dynamo/utils.py", line 2153, in run_node
return node.target(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_ops.py", line 716, in __call__
return self._op(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_library/autograd.py", line 113, in autograd_impl
result = forward_no_grad(*args, Metadata(keyset, keyword_only_args))
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_library/autograd.py", line 40, in forward_no_grad
result = op.redispatch(keyset & _C._after_autograd_keyset, *args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_ops.py", line 721, in redispatch
return self._handle.redispatch_boxed(keyset, *args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/utils/_stats.py", line 21, in wrapper
return fn(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1238, in __torch_dispatch__
return self.dispatch(func, types, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1692, in dispatch
return self._cached_dispatch_impl(func, types, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 1348, in _cached_dispatch_impl
output = self._dispatch_impl(func, types, args, kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py", line 2001, in _dispatch_impl
result = maybe_fake_impl(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_library/utils.py", line 20, in __call__
return self.func(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/library.py", line 1156, in inner
return func(*args, **kwargs)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_library/custom_ops.py", line 608, in fake_impl
raise RuntimeError(
torch._dynamo.exc.TorchRuntimeError: Failed running call_function mylib.step.default(*(FakeTensor(..., device='cuda:0', size=(8,), dtype=torch.int64),), **{}):
There was no fake impl registered for <CustomOpDef(mylib::step)>. This is necessary for torch.compile/export/fx tracing to work. Please use `step_func.register_fake` to add an fake impl.
from user code:
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/leanrl/ppo_atari_envpool_torchcompile.py", line 196, in torch_dynamo_resume_in_act_and_step_func_at_193
next_obs, reward, next_done, info = step_func(action)
File "/net/nfs.cirrascale/allennlp/costa/LeanRL/.venv/lib/python3.10/site-packages/torch/_library/custom_ops.py", line 669, in __call__
return self._opoverload(*args, **kwargs)
Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information
You can suppress this exception and fall back to eager by setting:
import torch._dynamo
torch._dynamo.config.suppress_errors = True
There seem to be some issues with getting the environment set up. I tried two installation methods.
Installation 1
One is to do
which seems to get stuck finding a
torchrl_nightlyversionInstallation 2
I tried building an environment from scratch, with two separate machines with different GPUs, all getting the same error as follows: