Skip to content

Fixed memory issue from metrics - #178

Open
abachma2 wants to merge 4 commits into
cyclus:mainfrom
abachma2:metrics
Open

Fixed memory issue from metrics#178
abachma2 wants to merge 4 commits into
cyclus:mainfrom
abachma2:metrics

Conversation

@abachma2

Copy link
Copy Markdown
Member

I modified the 'Materials' metric to remove the memory error described in issue #177. Merging will close Issue #177. This method works, but if there are preferred methods to maintain efficiency of database structure I am open to changes.

@abachma2
abachma2 requested review from bam241 and katyhuff January 25, 2021 16:20
@abachma2 abachma2 changed the title Fixed memory issue in 'Materials' metric Fixed memory issue from metrics Jan 25, 2021
Comment thread cymetric/metrics.py
y.name = 'Mass'
z = y.reset_index()
return z
x['Mass'] = x['Quantity'] * x['MassFrac']

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think you'll need to "drop" [Quantity] and [MassFrac] column

@katyhuff katyhuff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add a unit test that :

  • Would have failed before this commit
  • and passes now.

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