Skip to content

Warn character truncation once only #1959

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

Closed
wants to merge 1 commit into from

Conversation

Adaickalavan
Copy link
Member

  • Character truncation warning message from observation space formatter tends to fill up the terminal. Example:
    WARNING:smarts.env.utils.observation_conversion:`vehicle id` named `car-flow-route-E1_2_0-E3_2_max--5782264158901839037--6390006830799584855--3-0.2` is more than `50` characters long. It will be truncated and may cause unintended issues with navigation and lane identification.
    WARNING:smarts.env.utils.observation_conversion:`vehicle id` named `car-flow-route-E1_0_0-E3_0_max-6963017027078397547--6390006830799584855--0-0.2` is more than `50` characters long. It will be truncated and may cause unintended issues with navigation and lane identification.
    WARNING:smarts.env.utils.observation_conversion:`vehicle id` named `car-flow-route-E1_0_0-E3_0_max-6963017027078397547--6390006830799584855--0-0.3` is more than `50` characters long. It will be truncated and may cause unintended issues with navigation and lane identification.
    WARNING:smarts.env.utils.observation_conversion:`vehicle id` named `car-flow-route-E1_2_0-E3_2_max--5782264158901839037--6390006830799584855--3-0.2` is more than `50` characters long. It will be truncated and may cause unintended issues with navigation and lane identification.
  • Hence, warn only on the first occurence.
  • Is there better a way to warn once only?

@Gamenot
Copy link
Collaborator

Gamenot commented Apr 14, 2023

This seems like an important warning message. I am biased towards saying that this should be an error.

@Gamenot
Copy link
Collaborator

Gamenot commented Apr 14, 2023

My only thought for resolving this is to shorten the id or add configuration to increase the character limit.

@Adaickalavan
Copy link
Member Author

This seems like an important warning message. I am biased towards saying that this should be an error.

  • If this warning is converted into an error, then the simulation might not proceed far as this warning currently pops up very frequently.
  • The character truncation only affects the formatted observations returned to the users model, whereas smarts internally still has access to and may use the full untruncated vehicle ids.

@Gamenot
Copy link
Collaborator

Gamenot commented Apr 14, 2023

...

  • If this warning is converted into an error, then the simulation might not proceed far as this warning currently pops up very frequently.

That is fair, if they want the full observations they would then be forced to use SMARTS observation object directly.

  • The character truncation only affects the formatted observations returned to the users model, whereas smarts internally still has access to and may use the full untruncated vehicle ids.

Then I think we should shorten the generated id length. I am going to put up a PR for it.

@Gamenot Gamenot mentioned this pull request Apr 14, 2023
@Adaickalavan Adaickalavan deleted the avoid-repeated-warnings branch April 15, 2023 14:14
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

Successfully merging this pull request may close these issues.

2 participants