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

Move timing from run scenario #670

Merged

Conversation

datejada
Copy link
Member

@datejada datejada commented Jun 26, 2024

Pull request details

Describe the changes made in this pull request

Reallocate timing out of the scenario function

List of related issues or pull requests

Closes #667

Collaboration confirmation

As a contributor I confirm

  • I read and followed the instructions in README.dev.md
  • [NA] The documentation is up to date with the changes introduced in this Pull Request (or NA)
  • Tests are passing
  • Lint is passing

@datejada datejada marked this pull request as ready for review June 26, 2024 13:26
Copy link

codecov bot commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5aee7e5) to head (d660af5).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #670   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          788       789    +1     
=========================================
+ Hits           788       789    +1     

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

Copy link
Member

@abelsiqueira abelsiqueira left a comment

Choose a reason for hiding this comment

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

Nice. I was gonna say that maybe we should try to move to to inside EnergyProblem, but it is used independently in other places as well, so maybe that won't be easy or good.
One thing that I noticed is that we can use the timer from to itself directly, like this:

time_in_seconds = TimerOutputs.time(to["time to create blah"]) / 1e9

So maybe we could use only to and no @elapsed, but keep to as a global variable so that it is used in other places. At this point it doesn't seem really relevant what is the best, so let's keep it like this.

@abelsiqueira abelsiqueira merged commit 5d25cb9 into TulipaEnergy:main Jun 26, 2024
7 checks passed
@datejada datejada deleted the 667-move-timinig-from-run-scenario branch June 27, 2024 06:42
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.

Move timing from run_scenario to EnergyProblem function
2 participants