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

remove attrgetter performace optimization #1809

Merged
merged 1 commit into from
Sep 19, 2023
Merged

remove attrgetter performace optimization #1809

merged 1 commit into from
Sep 19, 2023

Conversation

Corvince
Copy link
Contributor

@Corvince Corvince commented Sep 18, 2023

Remove performace optimization to ease multi agent data collection.

This makes it possible to collect agent attributes with simple string values across multiple agent types.

Previously

agent_reporters={'a': 'val_a', 'b': 'val_b'}

would error if val_a or val_b is missing in some agents. Now it just returns None for that value.

And the performance drop should be barely noticable.

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.11% ⚠️

Comparison is base (7f5a32e) 81.47% compared to head (d833e91) 81.36%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1809      +/-   ##
==========================================
- Coverage   81.47%   81.36%   -0.11%     
==========================================
  Files          15       15              
  Lines         896      891       -5     
  Branches      193      191       -2     
==========================================
- Hits          730      725       -5     
  Misses        142      142              
  Partials       24       24              
Files Changed Coverage Δ
mesa/datacollection.py 88.76% <100.00%> (-0.60%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rht
Copy link
Contributor

rht commented Sep 18, 2023

Ruff error.

@Corvince
Copy link
Contributor Author

Oopsie, somehow my ruff extension for vscode only works roughly have the time and I almost always forget to check again. Should be fixed now.

@rht
Copy link
Contributor

rht commented Sep 18, 2023

Still Ruff error.

@rht rht merged commit bc5a5cd into main Sep 19, 2023
@rht rht deleted the remove-attregetter branch September 19, 2023 06:32
@tpike3 tpike3 added this to the Release 2.1.2 milestone Sep 19, 2023
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.

3 participants