-
-
Notifications
You must be signed in to change notification settings - Fork 29
Migrate from tic/toc timers and %time/%timeit to new Timer context manager #391
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: mmcky <[email protected]>
tic
,tac
,toc
timers to new Timer context manager in the quantecon package
|
@copilot a new release of Can we please remove the fall back code as it is no longer needed. |
Co-authored-by: mmcky <[email protected]>
Removed the Timer fallback code from both Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot please remove the |
Co-authored-by: mmcky <[email protected]>
Removed Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: mmcky <[email protected]>
Found and converted all remaining instances of
All Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR migrates all timing code in the lecture series from legacy timing patterns to the new
Timer
context manager pattern in the quantecon package v0.9.0.Changes Made
Updated timing patterns across multiple lectures:
lectures/numba.md
: Migrated 6 instances of tic/toc usagelectures/numpy.md
: Migrated 4 instances of tic/toc usage + 4 instances of %time/%%timelectures/parallelization.md
: Migrated 4 instances of %time/%%time usagelectures/jax_intro.md
: Migrated 13 instances of %time/%%time usageMigration patterns:
Note: All
%timeit
instances were correctly preserved as they serve a different purpose (benchmarking multiple runs vs single timing measurements).Validation
time1 / time3
still work correctly)The migration maintains full functionality while modernizing timing patterns to use the cleaner context manager approach with the official Timer implementation.
Fixes #390.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.