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

added error messages and memory reset #53

Merged
merged 2 commits into from
May 9, 2023
Merged

Conversation

johncalesp
Copy link
Contributor

  • Added external method to clear cache in GPU memory
  • Added error codes for habitat and energy in protobuf
  • Modified try-except blocks for habitat and energy

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd call this file memory_utils or something similar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed to utils.py

@@ -150,47 +150,56 @@ def energy_compute(self) -> pm.EnergyResponse:
for _ in range(iterations):
iteration(*inputs)
energy_measurer.end_measurement()
resp.total_consumption = energy_measurer.total_energy()/float(iterations)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this change mean a user has to enable CPU monitoring to get energy measurements? What if a user doesn't have access like in cloud instances?

Copy link
Contributor Author

@johncalesp johncalesp May 9, 2023

Choose a reason for hiding this comment

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

Actually no, the code is the same as before. I tried on my PC removing access to pyRAPL and the profile will only measure GPU power consumption.

Copy link
Contributor

Choose a reason for hiding this comment

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

After looking over the code with John, we determined that the exception is already handled in the measurement

logger.error(message)
resp.analysis_error.error_message = message
except:
logger.error("There was an error running deepview predict")
Copy link
Contributor

Choose a reason for hiding this comment

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

Change "deepview predict" to "DeepView Predict"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it

@codeclimate
Copy link

codeclimate bot commented May 9, 2023

Code Climate has analyzed commit dd97ec6 and detected 0 issues on this pull request.

View more on Code Climate.

@johncalesp johncalesp merged commit f78ce4e into main May 9, 2023
@johncalesp johncalesp deleted the sampling-batch-size branch May 9, 2023 15:30
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.

None yet

2 participants