gradboard 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gradboard might be problematic. Click here for more details.

gradboard/scheduler.py CHANGED
@@ -7,6 +7,7 @@ import copy
7
7
  import math
8
8
 
9
9
  from scipy.ndimage import gaussian_filter1d
10
+ import scipy.constants as sc
10
11
 
11
12
  from torch.amp import GradScaler
12
13
 
@@ -161,14 +162,19 @@ class PASS:
161
162
  minimum = min(range_test_results, key=lambda x: x[1])
162
163
  points_left_of_min = [p for p in range_test_results if p[0] < minimum[0]]
163
164
  highest_point_left_of_min = max(points_left_of_min, key=lambda x: x[1])
164
- halfway = (highest_point_left_of_min[1] + minimum[1]) / 2
165
+ golden_min_loss = (highest_point_left_of_min[1] + minimum[1]) / (1 + sc.golden)
166
+ golden_max_loss = (highest_point_left_of_min[1] + minimum[1]) / sc.golden
165
167
  for r in range_test_results:
166
- if r[1] < halfway:
167
- self.max_lr = r[0] * 3
168
- self.cool_point = r[0] / 3
169
- print("High LR", self.max_lr)
170
- print("Cool point", self.cool_point)
168
+ if r[1] < golden_max_loss:
169
+ self.cool_point = r[0]
171
170
  break
171
+ for r in range_test_results:
172
+ if r[1] < golden_min_loss:
173
+ self.max_lr = r[0]
174
+ else:
175
+ break
176
+ print("High LR", self.max_lr)
177
+ print("Cool point", self.cool_point)
172
178
 
173
179
  def update_learning_rates(self):
174
180
  if self.finished:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gradboard
3
- Version: 0.1.14
3
+ Version: 0.1.16
4
4
  Summary: Easily snowboard down gnarly loss gradients
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -0,0 +1,8 @@
1
+ gradboard/__init__.py,sha256=57AkHusYwLCsusiVnajH5pMFKioRCj-3IjF9qpdOzE0,69
2
+ gradboard/cycles.py,sha256=ZPXBL8rlaP6BYJ6Un2xRERsdifixSoVIZWaJMck4bjE,9945
3
+ gradboard/optimiser.py,sha256=Iw1piQkQkWdNUW8d9f3iPrvP9qEGVxEKmerK7ATDgOI,6189
4
+ gradboard/scheduler.py,sha256=h4MipSkdlOWw0H64qEaOTONYHpvas_lIcei7FeI8v_0,6740
5
+ gradboard-0.1.16.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
6
+ gradboard-0.1.16.dist-info/METADATA,sha256=Vc6DhM4AEJ1QxrYRmlzAvNHqfb8Y5jCPUBJaCDjKKXw,2174
7
+ gradboard-0.1.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
+ gradboard-0.1.16.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- gradboard/__init__.py,sha256=57AkHusYwLCsusiVnajH5pMFKioRCj-3IjF9qpdOzE0,69
2
- gradboard/cycles.py,sha256=ZPXBL8rlaP6BYJ6Un2xRERsdifixSoVIZWaJMck4bjE,9945
3
- gradboard/optimiser.py,sha256=Iw1piQkQkWdNUW8d9f3iPrvP9qEGVxEKmerK7ATDgOI,6189
4
- gradboard/scheduler.py,sha256=W146MgdTYz113R3M0qhVpk8kr6L1ioPS3pCFc3MhKYg,6507
5
- gradboard-0.1.14.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
6
- gradboard-0.1.14.dist-info/METADATA,sha256=aS23AKqKicnw3-uhKcPv1sfz3qQh4BQTpTEdltjKrU4,2174
7
- gradboard-0.1.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
- gradboard-0.1.14.dist-info/RECORD,,