gradboard 0.1.18__py3-none-any.whl → 0.1.20__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/cycles.py CHANGED
@@ -47,8 +47,13 @@ def quarter_circle(step: int, total_steps: int) -> float:
47
47
  # x^2 + y^2 = r^2 = 1
48
48
  # Therefore y^2 = 1 - x^2
49
49
  # Therefore y^2 = (1 + x)(1 - x)
50
- y_squared = (1 - x) * (1 + x)
51
- return math.sqrt(y_squared)
50
+ y_squared = max(1 - x, 0) * (1 + x)
51
+ try:
52
+ return math.sqrt(y_squared)
53
+ except ValueError:
54
+ print("total_steps: ", total_steps)
55
+ print("step: ", total_steps)
56
+ raise ValueError("Still broken!") from None
52
57
 
53
58
 
54
59
  def half_cosine(step: int, total_steps: int) -> float:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: gradboard
3
- Version: 0.1.18
3
+ Version: 0.1.20
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=iGEW3Rlp-JNyQZLfpaDXxUCAcEV01ANjLF-Fnhug-qA,10120
3
+ gradboard/optimiser.py,sha256=Iw1piQkQkWdNUW8d9f3iPrvP9qEGVxEKmerK7ATDgOI,6189
4
+ gradboard/scheduler.py,sha256=V5JImjirtmsMEhbrzu9gbqKlxRj0aaZTQw3mMN1Fk4c,6763
5
+ gradboard-0.1.20.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
6
+ gradboard-0.1.20.dist-info/METADATA,sha256=2zy8Tvmane0XKECsDom8nwEvQ_qpYIIslJye_Y7Vu0g,2174
7
+ gradboard-0.1.20.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
+ gradboard-0.1.20.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=V5JImjirtmsMEhbrzu9gbqKlxRj0aaZTQw3mMN1Fk4c,6763
5
- gradboard-0.1.18.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
6
- gradboard-0.1.18.dist-info/METADATA,sha256=r0h7SXqZOBEBvZ93XLY40QJn2gaQF5-tz65RLHUxHaU,2174
7
- gradboard-0.1.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
8
- gradboard-0.1.18.dist-info/RECORD,,