gradboard 0.1.5__tar.gz → 0.1.7__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: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Easily snowboard down gnarly loss gradients
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -28,12 +28,9 @@ class PASS:
28
28
  max_lr: float = None,
29
29
  cool_point: float = None,
30
30
  ):
31
- assert (max_lr is not None) == (cool_point is not None)
32
- assert (
33
- ((max_lr is not None) and (cool_point is not None))
34
- != range_test
35
- is not None
36
- )
31
+ if not range_test:
32
+ assert max_lr is not None
33
+ assert cool_point is not None
37
34
 
38
35
  self.model = model
39
36
  self.optimiser = optimiser
@@ -142,7 +139,7 @@ class PASS:
142
139
  learning_rates = [t[0] for t in range_test_results]
143
140
  losses = [t[1] for t in self.range_test_results]
144
141
  losses = losses[:-1] + [10 * max(losses)]
145
- smoothed_losses = gaussian_filter1d([t[1] for t in range_test_results][:-1], 3)
142
+ smoothed_losses = gaussian_filter1d([t[1] for t in losses], 3)
146
143
  return list(zip(learning_rates, smoothed_losses, strict=True))
147
144
 
148
145
  def _plot_range_test(self, range_test_results):
@@ -161,8 +158,6 @@ class PASS:
161
158
  ...
162
159
  """
163
160
  range_test_results = self._smoothed_range_test(self.range_test_results)
164
- self._plot_range_test(range_test_results)
165
-
166
161
  minimum = min(range_test_results, key=lambda x: x[1])
167
162
  points_left_of_min = [p for p in range_test_results if p[0] < minimum[0]]
168
163
  highest_point_left_of_min = max(points_left_of_min, key=lambda x: x[1])
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gradboard"
3
- version = "0.1.5"
3
+ version = "0.1.7"
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