I trained a model of the task Isaac-Factory-PegInsert-Direct-v0 , got the .pth file under this path9IsaacLab/logs/rl_games/Factory/test/nn)
while iam playing ,unable to load the checkpoint
iam posting the error here ,please help me with this
=> loading checkpoint ‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’
Exception Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([scalar]) or the torch.serialization.safe_globals([scalar]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only torch.load — PyTorch 2.9 documentation . when trying to execute <function load at 0x77a0f2724040> with args:(‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’,) and kwargs:{}…
Waiting 1 before trying again…
Exception Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([scalar]) or the torch.serialization.safe_globals([scalar]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only torch.load — PyTorch 2.9 documentation . when trying to execute <function load at 0x77a0f2724040> with args:(‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’,) and kwargs:{}…
Waiting 2 before trying again…
Exception Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([scalar]) or the torch.serialization.safe_globals([scalar]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only torch.load — PyTorch 2.9 documentation . when trying to execute <function load at 0x77a0f2724040> with args:(‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’,) and kwargs:{}…
Waiting 4 before trying again…
Exception Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([scalar]) or the torch.serialization.safe_globals([scalar]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only torch.load — PyTorch 2.9 documentation . when trying to execute <function load at 0x77a0f2724040> with args:(‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’,) and kwargs:{}…
Waiting 8 before trying again…
Exception Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL numpy.core.multiarray.scalar was not an allowed global by default. Please use torch.serialization.add_safe_globals([scalar]) or the torch.serialization.safe_globals([scalar]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only torch.load — PyTorch 2.9 documentation . when trying to execute <function load at 0x77a0f2724040> with args:(‘/home/harika-gurram/IsaacLab/logs/rl_games/Factory/test/nn/last_Factory_ep_200_rew__364.93903_.pth’,) and kwargs:{}…
Waiting 16 before trying again…
Error executing job with overrides: [ ]
Traceback (most recent call last):
File “/home/harika-gurram/IsaacLab/source/isaaclab_tasks/isaaclab_tasks/utils/hydra.py”, line 101, in hydra_main
func(env_cfg, agent_cfg, *args, **kwargs)
File “/home/harika-gurram/IsaacLab/scripts/reinforcement_learning/rl_games/play.py”, line 162, in main
agent.restore(resume_path)
File “/home/harika-gurram/anaconda3/envs/env_isaaclab/lib/python3.10/site-packages/rl_games/algos_torch/players.py”, line 73, in restore
checkpoint = torch_ext.load_checkpoint(fn)
File “/home/harika-gurram/anaconda3/envs/env_isaaclab/lib/python3.10/site-packages/rl_games/algos_torch/torch_ext.py”, line 83, in load_checkpoint
state = safe_load(filename)
File “/home/harika-gurram/anaconda3/envs/env_isaaclab/lib/python3.10/site-packages/rl_games/algos_torch/torch_ext.py”, line 75, in safe_load
return safe_filesystem_op(torch.load, filename)
File “/home/harika-gurram/anaconda3/envs/env_isaaclab/lib/python3.10/site-packages/rl_games/algos_torch/torch_ext.py”, line 69, in safe_filesystem_op
raise RuntimeError(f’Could not execute {func}, give up after {num_attempts} attempts…')
RuntimeError: Could not execute <function load at 0x77a0f2724040>, give up after 5 attempts…
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.