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

Performance metrics #1753

Merged
merged 737 commits into from
Dec 14, 2022
Merged

Performance metrics #1753

merged 737 commits into from
Dec 14, 2022

Conversation

Adaickalavan
Copy link
Member

  1. An easy to use Metrics env wrapper is introduced to compute agents' performance metrics.
  2. Fine grained modular metric computation and reporting for each agent in each scenario.
  3. An overall performance score is also computed.
  4. Access to private variables is restricted to ensure security of metrics computed.
  5. Immutable data structures are favoured, such as frozen Counts and Costs, to facilitate scalability, understandability, and to prevent accidental erroneous modifications.

@Adaickalavan Adaickalavan self-assigned this Nov 28, 2022
@Adaickalavan Adaickalavan mentioned this pull request Nov 28, 2022
1 task
@Adaickalavan Adaickalavan linked an issue Nov 28, 2022 that may be closed by this pull request
1 task
smarts/env/wrappers/metric/termination.py Outdated Show resolved Hide resolved
smarts/env/wrappers/metrics.py Outdated Show resolved Hide resolved
smarts/env/wrappers/metrics.py Outdated Show resolved Hide resolved
smarts/env/wrappers/metrics.py Outdated Show resolved Hide resolved
smarts/env/wrappers/metric/counts.py Outdated Show resolved Hide resolved
smarts/env/wrappers/metric/counts.py Show resolved Hide resolved
self._records[self._cur_scen][agent_name].record.counts = _add_dataclass(
counts,
self._records[self._cur_scen][agent_name].record.counts
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have mixed feelings about this approach. Though the immutability is nice, it seems like a bit of a burdensome way to maintain state. Creating a new dict and dataclass each step also seems inefficient. I don't think it's too critical as long as the performance is ok though.

@Adaickalavan Adaickalavan merged commit 46acf1a into develop Dec 14, 2022
@Adaickalavan Adaickalavan deleted the metrics-1 branch December 14, 2022 23:46
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.

Fix Completion metric
5 participants