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

scorer.py AttributeError #1004

Open
bsimmons-onboard opened this issue Apr 5, 2023 · 6 comments
Open

scorer.py AttributeError #1004

bsimmons-onboard opened this issue Apr 5, 2023 · 6 comments
Labels
bug Something isn't working P2 Medium priority (default)

Comments

@bsimmons-onboard
Copy link
Contributor

Describe the bug
Unable to run scorer.py, throws an AttributeError:

To Reproduce
python3 tools/scoring/scorer.py -prop ahu_prop.yaml -sol ahu_solution.yaml
...
Scoring — building universe FieldUniverse undefined in ConfigUniverse
...
Traceback (most recent call last): File "/home/brian/github/digitalbuildings/tools/scoring/scorer.py", line 72, in <module> pp.pprint(scorer.execute()) File "/home/brian/github/digitalbuildings/tools/scoring/score/parse_config.py", line 248, in execute self.results = self.aggregate_results( File "/home/brian/github/digitalbuildings/tools/scoring/score/parse_config.py", line 218, in aggregate_results evaluated = dimension(deserialized_files=deserialized_files).evaluate() File "/home/brian/github/digitalbuildings/tools/scoring/score/dimensions/entity_point_identification.py", line 195, in evaluate self._evaluate_virtual(proposed_file=proposed_file, File "/home/brian/github/digitalbuildings/tools/scoring/score/dimensions/entity_point_identification.py", line 107, in _evaluate_virtual proposed_points_virtual = self._fetch_points_virtual( File "/home/brian/github/digitalbuildings/tools/scoring/score/dimensions/entity_point_identification.py", line 55, in _fetch_points_virtual return [ File "/home/brian/github/digitalbuildings/tools/scoring/score/dimensions/entity_point_identification.py", line 57, in <listcomp> set(file[link.source].translation[target_field].raw_field_name File "/home/brian/github/digitalbuildings/tools/scoring/score/dimensions/entity_point_identification.py", line 57, in <genexpr> set(file[link.source].translation[target_field].raw_field_name AttributeError: 'UndefinedField' object has no attribute 'raw_field_name'

OS (please complete the following information):
Ubuntu

Test Files
Sending test files to digitalbuildings-support@googlegroups.com

@bsimmons-onboard
Copy link
Contributor Author

Looks like this is caused by MISSING fields. I was able to run the scoring tool after removing them from the prop and solution files.

@charbull
Copy link
Collaborator

@mschulze17 @trav3711 we need to update the scorer to support the missing fields, it could be a P2 but would be worth it to capture it somewhere internally

@trav3711
Copy link
Contributor

@bsimmons-onboard Is this issue blocking for you?

@bsimmons-onboard
Copy link
Contributor Author

@trav3711 I can proceed with a workaround where I remove missing fields from the prop and solution files. From the README it seems like missing types are intended to factor into the score.
https://github.com/google/digitalbuildings/tree/master/tools/scoring#caveats

@mschulze17 mschulze17 added bug Something isn't working P2 Medium priority (default) labels Apr 17, 2023
@charbull
Copy link
Collaborator

@bsimmons-onboard assigned this bug to you :)

@charbull
Copy link
Collaborator

Chatted and reassigning to @trav3711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Medium priority (default)
Projects
None yet
Development

No branches or pull requests

5 participants