Skip to content

Commit

Permalink
Prep for release
Browse files Browse the repository at this point in the history
  • Loading branch information
warner-benjamin committed Jan 27, 2023
1 parent a855da1 commit 94c35b3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fastxtend/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.15"
__version__ = "0.0.16"
10 changes: 8 additions & 2 deletions fastxtend/callback/progresize.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,14 @@ def before_fit(self):

if self.resize_batch:
# Set when the progressive resizing step is applied in training percent
self.start = self.start/self.n_epoch if isinstance(self.start, int) else self.start
self.finish = self.finish/self.n_epoch if isinstance(self.finish, int) else self.finish
if self.start >= 1 and isinstance(self.start, int):
self.start = self.start/self.n_epoch
if self.finish >= 1 and isinstance(self.finish, int):
self.finish = self.finish/self.n_epoch
if self.start >= 1:
warn(f'ProgressiveResize start {self.start} is equal or greater than one and will not start in this training run')
if self.finish >= 1:
warn(f'ProgressiveResize finish {self.finish} is equal or greater than one and will not finish in this training run')
n_steps = ((self.final_size-self.current_size) / self.increase_by).int()
if sum(n_steps.shape)==2:
n_steps = n_steps[0].item()
Expand Down
10 changes: 8 additions & 2 deletions nbs/callback.progresize.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,14 @@
"\n",
" if self.resize_batch:\n",
" # Set when the progressive resizing step is applied in training percent\n",
" self.start = self.start/self.n_epoch if isinstance(self.start, int) else self.start\n",
" self.finish = self.finish/self.n_epoch if isinstance(self.finish, int) else self.finish\n",
" if self.start >= 1 and isinstance(self.start, int):\n",
" self.start = self.start/self.n_epoch\n",
" if self.finish >= 1 and isinstance(self.finish, int):\n",
" self.finish = self.finish/self.n_epoch\n",
" if self.start >= 1:\n",
" warn(f'ProgressiveResize start {self.start} is equal or greater than one and will not start in this training run')\n",
" if self.finish >= 1:\n",
" warn(f'ProgressiveResize finish {self.finish} is equal or greater than one and will not finish in this training run')\n",
" n_steps = ((self.final_size-self.current_size) / self.increase_by).int()\n",
" if sum(n_steps.shape)==2:\n",
" n_steps = n_steps[0].item()\n",
Expand Down
2 changes: 1 addition & 1 deletion nbs/optimizer.adan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
"AdamW vs Adan Training Speed\n",
":::\n",
"\n",
"[^faster]: Benchmarked on a GeForce 3080 Ti using PyTorch 1.13.1 on Cuda 11.7, Mixed Precision, [Channels Last](callback.channelslast.html) (except DeBERTa and ViT), and fastxtend's [Simple Profiler Callback](callback.simpleprofiler.html). Results may differ on other models, hardware, and across benchmarking runs. Speedup and slowdown are calculated from the total time spent on the optimization step."
"[^faster]: Benchmarked on a GeForce 3080 Ti using PyTorch 1.13.1 Cuda 11.7, Mixed Precision, [Channels Last](callback.channelslast.html) (except DeBERTa and ViT), and fastxtend's [Simple Profiler Callback](callback.simpleprofiler.html). Results may differ on other models, hardware, and across benchmarking runs. Speedup and slowdown are calculated from the total time spent on the optimization step."
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion nbs/optimizer.fused.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"\n",
": Increase in [AdamW](#adam-optimizer) `opt_step` Speed With Multiple Param Groups vs fastai Native Optimizer {#tbl-layers} {tbl-colwidths=\"[10,2,8,8,8,8,8]\"}\n",
"\n",
"[^faster]: All optimizers benchmarked on a GeForce 3080 Ti using PyTorch 1.12.1 on Cuda 11.6, Mixed Precision, [Channels Last](callback.channelslast.html) (except ViT and DeBERTa), and fastxtend's [Simple Profiler Callback](callback.simpleprofiler.html). Results may differ with other optimizers, models, hardware, and across benchmarking runs. Speedup is calculated from the total time spent on the optimization step.\n",
"[^faster]: All optimizers benchmarked on a GeForce 3080 Ti using PyTorch 1.12.1 Cuda 11.6, Mixed Precision, [Channels Last](callback.channelslast.html) (except ViT and DeBERTa), and fastxtend's [Simple Profiler Callback](callback.simpleprofiler.html). Results may differ with other optimizers, models, hardware, and across benchmarking runs. Speedup is calculated from the total time spent on the optimization step.\n",
"\n",
"## Examples\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author = Benjamin Warner
author_email = me@benjaminwarner.dev
copyright = Benjamin Warner
branch = main
version = 0.0.15
version = 0.0.16
min_python = 3.8
audience = Developers
language = English
Expand Down

0 comments on commit 94c35b3

Please sign in to comment.