8000 GitHub · Where software is built
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
room_type_map error #24
Open
Open
@mariiak2021

Description

@mariiak2021

Hi!

I'm trying to generate the dataset which will contain only 1-room houses. For that I have edited room_specs.py file by saving only 4 room specs available:

        RoomSpec(
            room_spec_id="kitchen",
            sampling_weight=1,
            spec=[LeafRoom(room_id=2, ratio=1, room_type="Kitchen")],
        ),
        RoomSpec(
            room_spec_id="living-room",
            sampling_weight=1,
            spec=[LeafRoom(room_id=2, ratio=1, room_type="LivingRoom")],
        ),
        RoomSpec(
            room_spec_id="bedroom",
            sampling_weight=1,
            spec=[LeafRoom(room_id=2, ratio=1, room_type="Bedroom")],
        ),
        RoomSpec(
            # scale=1.25?
            room_spec_id="bathroom",
            sampling_weight=1,
            spec=[LeafRoom(room_id=2, ratio=1, room_type="Bathroom")],
        ),

During the generation process after the random number of generated houses I'm encountering an error like:

multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/mkhan/.conda/envs/pr/lib/python3.9/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/mkhan/.conda/envs/pr/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/home/mkhan/pr/scripts/generate_procthor_10k_dataset.py", line 63, in generate_house
    house, _ = house_generator.sample()
  File "/home/mkhan/pr/procthor/generation/__init__.py", line 201, in sample
    door_polygons = gfs.add_doors(
  File "/home/mkhan/pr/procthor/generation/doors.py", line 103, in default_add_doors
    outdoor_openings = select_outdoor_openings(
  File "/home/mkhan/pr/procthor/generation/doors.py", line 139, in select_outdoor_openings
    room_type = room_type_map[room_id]
KeyError: 0
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/mkhan/pr/scripts/generate_procthor_10k_dataset.py", line 81, in <module>
    r = p.map(generate_house, range(100_000))
  File "/home/mkhan/.conda/envs/pr/lib/python3.9/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/home/mkhan/.conda/envs/pr/lib/python3.9/multiprocessing/pool.py", line 771, in get
    raise self._value
KeyError: 0
"""

@mattdeitke Can you please help to understand what can cause it or what's wrong with my set up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0