VerifAI still requires hashable fields?

Hi!

Does the latest VerifAI version still require the attributes in classes of model.scenic to be hashable? I had some issue before where I couldn’t run the falsification due to some of my classes have simulator-specific attribute types that are not hashable. Thanks a lot!

Hello Kai, the short answer is yes, but there are workarounds. VerifAI requires that all values in the semantic feature space must be hashable (they should be immutable plain old data). When you define a feature space using a Scenic program, (almost) every property of each Scenic object becomes a feature, and so it needs to have a hashable value.

The workaround is that some properties are ignored when creating the feature space, since they’re internal or otherwise have values which we don’t want to include in the error table. In particular, any property starting with an underscore is ignored, so you could just rename your properties appropriately (for internal properties that users shouldn’t be setting, an underscore would make sense regardless). If you don’t want to rename your properties or need finer-grained control, you can pass an explicit set of properties to ignore using the ignoredProperties option of ScenicSampler documented here.