gradboard 1.0.0__tar.gz → 1.0.2__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gradboard
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Easily snowboard down gnarly loss gradients
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -129,7 +129,7 @@ class AdamS(Optimizer):
129
129
  return loss
130
130
 
131
131
 
132
- def get_optimiser(model, optimiser=AdamW, lr=7e-4, weight_decay=5e-2):
132
+ def get_optimiser(model, optimiser=AdamW, lr=1e-3, weight_decay=1e-2):
133
133
  """
134
134
  Defaults are from one of the presets from the accompanying repo to Hassani
135
135
  et al. (2023) "Escaping the Big Data Paradigm with Compact Transformers",
@@ -159,20 +159,10 @@ class PASS:
159
159
  """
160
160
  range_test_results = self._smoothed_range_test(self.range_test_results)
161
161
  minimum = min(range_test_results, key=lambda x: x[1])
162
- min_loss = minimum[1]
163
- points_left_of_min = [p for p in range_test_results if p[0] < minimum[0]]
164
- highest_point_left_of_min = max(points_left_of_min, key=lambda x: x[1])
165
- loss_difference = highest_point_left_of_min[1] - minimum[1]
166
- cool_point_loss = min_loss + 0.8 * loss_difference
167
- max_lr_loss = min_loss + 0.2 * loss_difference
168
162
  for r in range_test_results:
169
- if r[1] < cool_point_loss:
170
- self.cool_point = r[0]
171
- break
172
- for r in range_test_results:
173
- if r[1] <= max_lr_loss:
174
- self.max_lr = r[0]
175
- break
163
+ if (r[0] < minimum[0]) and (r[1] > minimum[1]):
164
+ self.max_lr = r[0] / 2
165
+ self.cool_point = self.max_lr * 0.1
176
166
  print("High LR", self.max_lr)
177
167
  print("Cool point", self.cool_point)
178
168
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gradboard"
3
- version = "1.0.0"
3
+ version = "1.0.2"
4
4
  description = "Easily snowboard down gnarly loss gradients"
5
5
  authors = [
6
6
  {name = "Nicholas Bailey"}
File without changes
File without changes
File without changes