Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation error, tasks.py", line 342 assert len(self.files) > 0 AssertionError #9

Open
Abduoit opened this issue Jun 16, 2021 · 3 comments

Comments

@Abduoit
Copy link

Abduoit commented Jun 16, 2021

Hi

I am getting the following error when I run the evaluation code, could you please help?

This is on Ubuntu 16.04, the following is the environment info: -

(multiarm) abdu@grasp-uoit:~/decentralized-multiarm$ python
Python 3.7.9 (default, Aug 31 2020, 12:42:55) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> print(torch.__version__)
1.6.0
>>> torch.version.cuda
'10.2'
>>> torch.cuda.is_available()
True
>>> torch.cuda.current_device()
0
>>> torch.cuda.device(0)
<torch.cuda.device object at 0x7fa815a19c10>
>>> torch.cuda.device_count()
1
>>> torch.cuda.get_device_name(0)
'GeForce GTX 1080'
>>> 
(multiarm) abdu@grasp-uoit:~/decentralized-multiarm$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

The output:-

(multiarm) abdu@grasp-uoit:~/decentralized-multiarm$ python main.py --mode benchmark --tasks_path benchmark/ --load ours/ours.pth --num_processes 1 --gui
pybullet build time: Jun 13 2021 11:25:20
[Setup] Parallelizing across 1 processes
2021-06-16 09:42:44,178	INFO services.py:1166 -- View the Ray dashboard at http://127.0.0.1:8265
[Setup] Creating task loader...
[Setup] Creating environments...
(pid=6025) pybullet build time: Jun 13 2021 11:25:20
(pid=6019) pybullet build time: Jun 13 2021 11:25:20
(pid=6025) [TaskLoader] WARNING: not repeating tasks.
(pid=6019) [BenchmarkEnv] config:
(pid=6019) 	episode_length:400
(pid=6019) 	action_interval:0.05
(pid=6019) 	simulation_time:20
(pid=6019) startThreads creating 1 threads.
(pid=6019) starting thread 0
(pid=6019) started thread 0 
(pid=6019) argc=2
(pid=6019) argv[0] = --unused
(pid=6019) argv[1] = --start_demo_name=Physics Server
(pid=6019) ExampleBrowserThreadFunc started
(pid=6019) X11 functions dynamically loaded using dlopen/dlsym OK!
(pid=6019) X11 functions dynamically loaded using dlopen/dlsym OK!
(pid=6019) Creating context
(pid=6019) Created GL 3.3 context
(pid=6019) Direct GLX rendering context obtained
(pid=6019) Making context current
(pid=6019) GL_VENDOR=NVIDIA Corporation
(pid=6019) GL_RENDERER=GeForce GTX 1080/PCIe/SSE2
(pid=6019) GL_VERSION=3.3.0 NVIDIA 440.33.01
(pid=6019) GL_SHADING_LANGUAGE_VERSION=3.30 NVIDIA via Cg compiler
(pid=6019) pthread_getconcurrency()=0
(pid=6019) Version = 3.3.0 NVIDIA 440.33.01
(pid=6019) Vendor = NVIDIA Corporation
(pid=6019) Renderer = GeForce GTX 1080/PCIe/SSE2
(pid=6019) b3Printf: Selected demo: Physics Server
(pid=6019) startThreads creating 1 threads.
(pid=6019) starting thread 0
(pid=6019) started thread 0 
(pid=6019) MotionThreadFunc thread started
(pid=6019) ven = NVIDIA Corporation
(pid=6019) ven = NVIDIA Corporation
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3P
2021-06-16 09:42:51,956	ERROR worker.py:1018 -- Possible unhandled error from worker: ray::TaskLoader.__init__() (pid=6025, ip=10.128.19.62)
  File "python/ray/_raylet.pyx", line 484, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 438, in ray._raylet.execute_task.function_executor
  File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 342, in __init__
    assert len(self.files) > 0
AssertionError
(pid=6019) rintf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: ee_link
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: base
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: tool0
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp,126]:
(pid=6019) 
(pid=6019) b3Printf: No inertial data for link, using mass=1, localinertiadiagonal = 1,1,1, identity local inertial frame
(pid=6019) b3Printf: b3Warning[examples/Importers/ImportURDFD
(pid=6019) 	position_tolerance:0.02
(pid=6019) 	orientation_tolerance:0.1
(pid=6019) [BaseEnv] Setting up ray: Actor(ParallelBenchmarkEnv,7bbd902801000000)
Traceback (most recent call last):
  File "main.py", line 83, in <module>
    simulate(args, config)
  File "main.py", line 55, in simulate
    observations = ray.get([e.reset.remote() for e in envs])
  File "/home/abdu/anaconda3/envs/multiarm/lib/python3.7/site-packages/ray/worker.py", line 1428, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(AssertionError): ray::ParallelBenchmarkEnv.reset() (pid=6019, ip=10.128.19.62)
  File "python/ray/_raylet.pyx", line 484, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 438, in ray._raylet.execute_task.function_executor
  File "/home/abdu/decentralized-multiarm/environment/baseEnv.py", line 582, in reset
    self.setup_task()
  File "/home/abdu/decentralized-multiarm/environment/baseEnv.py", line 617, in setup_task
    min_task_difficulty=self.min_task_difficulty)
  File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 282, in setup_next_task
    self.task_loader.get_next_task.remote())
ray.exceptions.RayTaskError(AssertionError): ray::TaskLoader.get_next_task() (pid=6025, ip=10.128.19.62)
  File "python/ray/_raylet.pyx", line 445, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 479, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 483, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 484, in ray._raylet.execute_task
  File "python/ray/_raylet.pyx", line 438, in ray._raylet.execute_task.function_executor
  File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 342, in __init__
    assert len(self.files) > 0
AssertionError
(pid=6021) [SAC] loading networks from  ours/ours.pth
(pid=6021) [SAC] Continuing from time step  667534701  and update step  750000
(pid=6021) StochasticActor(
(pid=6021)   (seq_net): LSTM(107, 256, batch_first=True)
(pid=6021)   (net): Sequential(
(pid=6021)     (0): Linear(in_features=256, out_features=128, bias=True)
(pid=6021)     (1): Tanh()
(pid=6021)     (2): Linear(in_features=128, out_features=64, bias=True)
(pid=6021)     (3): Tanh()
(pid=6021)     (4): Linear(in_features=64, out_features=12, bias=True)
(pid=6021)     (5): Tanh()
(pid=6021)   )
(pid=6021) )
(pid=6021) Q(
(pid=6021)   (seq_net): LSTM(107, 256, batch_first=True)
(pid=6021)   (net): Sequential(
(pid=6021)     (0): Linear(in_features=262, out_features=128, bias=True)
(pid=6021)     (1): Tanh()
(pid=6021)     (2): Linear(in_features=128, out_features=64, bias=True)
(pid=6021)     (3): Tanh()
(pid=6021)     (4): Linear(in_features=64, out_features=1, bias=True)
(pid=6021)   )
(pid=6021) )

or

(multiarm) abdu@grasp-uoit:~/decentralized-multiarm$ python benchmark_dynamic.py --mode benchmark --tasks_path benchmark/ --load ours/ours.pth --num_processes 1 --gui
pybullet build time: Jun 13 2021 11:25:20
2021-06-16 09:42:12,381	INFO services.py:1166 -- View the Ray dashboard at http://127.0.0.1:8265
[TaskLoader] WARNING: not repeating tasks.
Traceback (most recent call last):
  File "benchmark_dynamic.py", line 48, in <module>
    repeat=False)
  File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 342, in __init__
    assert len(self.files) > 0
AssertionError
@movefasta
Copy link

Same output on Ubuntu 20.04 on both commands

@youdianlan
Copy link

@Abduoit I think the main problem is as following from your log:
2021-06-16 09:42:51,956 ERROR worker.py:1018 -- Possible unhandled error from worker: ray::TaskLoader.init() (pid=6025, ip=10.128.19.62)
File "python/ray/_raylet.pyx", line 484, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 438, in ray._raylet.execute_task.function_executor
File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 342, in init
assert len(self.files) > 0
AssertionError

That means no files are specified when creat tasks. Download 'tasks.tar.xz' from https://multiarm.cs.columbia.edu/downloads/data/tasks.tar.xz, extract it into your 'decentralized-multiarm' folder, then rerun the
command:
python main.py --mode benchmark --tasks_path tasks/ --load ours/ours.pth --num_processes 1 --gui
This works for me.

@GuQian-Alex
Copy link

@Abduoit I think the main problem is as following from your log: 2021-06-16 09:42:51,956 ERROR worker.py:1018 -- Possible unhandled error from worker: ray::TaskLoader.init() (pid=6025, ip=10.128.19.62) File "python/ray/_raylet.pyx", line 484, in ray._raylet.execute_task File "python/ray/_raylet.pyx", line 438, in ray._raylet.execute_task.function_executor File "/home/abdu/decentralized-multiarm/environment/tasks.py", line 342, in init assert len(self.files) > 0 AssertionError

That means no files are specified when creat tasks. Download 'tasks.tar.xz' from https://multiarm.cs.columbia.edu/downloads/data/tasks.tar.xz, extract it into your 'decentralized-multiarm' folder, then rerun the command: python main.py --mode benchmark --tasks_path tasks/ --load ours/ours.pth --num_processes 1 --gui This works for me.

Thanks, this really works .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants