Skip to content

There are some issues with scenario_id #69

Description

@zuodong-zhong

I encountered the following error while getting scenoria_id based on the tutorial in the notebooks:
Cannot batch tensors with different shapes in component 5. First element had shape [1,16] and element 1 had shape [1,15]. [Op:IteratorGetNext]

Before this, I passed in my custom data_config and compared it with the official one. The main issue was that the batch_dims were different. When I set batch_dims to 1, the issue was resolved.

Based on the error message, I suspect that the problem occurred when batching the tensors into NumPy arrays, where the lengths didn’t match. I then printed out scenario_id and scenario, and noticed that while the length of scenario was consistent, scenario_id had the shape (1, 1, None), dtype=tf.uint8. Upon further inspection, I saw that scenario_id had 15 characters in some cases and 16 characters in others, which matches the error message exactly!

Therefore, I’d like to remind everyone about potential ID-related errors. You could try setting batch_dims to 1. Also, for better parallelization, I hope the official solution will handle padding for scenario_id lengths. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions