neuroplot 0.1.0__tar.gz → 0.1.1__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.
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuroplot
3
+ Version: 0.1.1
4
+ Summary: A lightweight, modular real-time visualization and diagnostics library for PyTorch.
5
+ Description-Content-Type: text/markdown
6
+ Requires-Dist: torch
7
+ Requires-Dist: matplotlib
8
+ Requires-Dist: numpy
9
+ Requires-Dist: imageio
10
+
11
+ # NeuroPlot 🧠📊
12
+ A lightweight, modular real-time training telemetry and visualization library for PyTorch.
13
+
14
+ NeuroPlot provides live, multi-panel diagnostic monitoring during your training loops—allowing you to track decision boundaries, latent space representations, loss curves, and accuracy metrics seamlessly.
15
+
16
+ ## Features
17
+ - Live Multi-Panel Dashboard: Watch decision boundaries and latent spaces evolve in real-time alongside loss and accuracy curves.
18
+ - Automatic GIF Compilation: Automatically capture training progress and compile it into a clean GIF.
19
+ - Best-Model Checkpointing: Automatically track and save the best-performing model weights.
20
+
21
+ ## Installation
22
+ pip install neuroplot
23
+
24
+ ## Quick Start Usage Guide
25
+ import torch
26
+ import torch.nn as nn
27
+ import torch.optim as optim
28
+ import sklearn.datasets as datasets
29
+ from neuroplot import LiveVisualizer
30
+
31
+ # 1. Prepare data and model
32
+ X, y = datasets.make_moons(n_samples=100, noise=0.1)
33
+ x = torch.tensor(X, dtype=torch.float32)
34
+ y = torch.tensor(y, dtype=torch.float32).view(-1, 1)
35
+
36
+ class Moon_MLP(nn.Module):
37
+ def __init__(self):
38
+ super().__init__()
39
+ self.fc1 = nn.Linear(2, 8)
40
+ self.fc2 = nn.Linear(8, 8)
41
+ self.fc3 = nn.Linear(8, 1)
42
+
43
+ def forward(self, x):
44
+ x = torch.relu(self.fc1(x))
45
+ x = torch.relu(self.fc2(x))
46
+ x = torch.sigmoid(self.fc3(x))
47
+ return x
48
+
49
+ model = Moon_MLP()
50
+ optimizer = optim.Adam(model.parameters(), lr=0.01)
51
+
52
+ # 2. Initialize NeuroPlot
53
+ viz = LiveVisualizer(
54
+ plots=["boundary", "latent", "loss", "accuracy"],
55
+ model=model,
56
+ data=(x, y),
57
+ update_every=50,
58
+ save_gif=True,
59
+ gif_name="neuroplot_demo.gif",
60
+ save_best_model=True,
61
+ checkpoint_path="best_model.pth"
62
+ )
63
+
64
+ # 3. Training Loop
65
+ for epoch in range(1000):
66
+ y_pred = model(x)
67
+ loss = nn.BCELoss()(y_pred, y)
68
+
69
+ preds = (y_pred >= 0.5).float()
70
+ acc = (preds == y).float().mean().item()
71
+
72
+ optimizer.zero_grad()
73
+ loss.backward()
74
+ optimizer.step()
75
+
76
+ viz.step(epoch, loss=loss.item(), accuracy=acc)
77
+
78
+ viz.close()
@@ -0,0 +1,68 @@
1
+ # NeuroPlot 🧠📊
2
+ A lightweight, modular real-time training telemetry and visualization library for PyTorch.
3
+
4
+ NeuroPlot provides live, multi-panel diagnostic monitoring during your training loops—allowing you to track decision boundaries, latent space representations, loss curves, and accuracy metrics seamlessly.
5
+
6
+ ## Features
7
+ - Live Multi-Panel Dashboard: Watch decision boundaries and latent spaces evolve in real-time alongside loss and accuracy curves.
8
+ - Automatic GIF Compilation: Automatically capture training progress and compile it into a clean GIF.
9
+ - Best-Model Checkpointing: Automatically track and save the best-performing model weights.
10
+
11
+ ## Installation
12
+ pip install neuroplot
13
+
14
+ ## Quick Start Usage Guide
15
+ import torch
16
+ import torch.nn as nn
17
+ import torch.optim as optim
18
+ import sklearn.datasets as datasets
19
+ from neuroplot import LiveVisualizer
20
+
21
+ # 1. Prepare data and model
22
+ X, y = datasets.make_moons(n_samples=100, noise=0.1)
23
+ x = torch.tensor(X, dtype=torch.float32)
24
+ y = torch.tensor(y, dtype=torch.float32).view(-1, 1)
25
+
26
+ class Moon_MLP(nn.Module):
27
+ def __init__(self):
28
+ super().__init__()
29
+ self.fc1 = nn.Linear(2, 8)
30
+ self.fc2 = nn.Linear(8, 8)
31
+ self.fc3 = nn.Linear(8, 1)
32
+
33
+ def forward(self, x):
34
+ x = torch.relu(self.fc1(x))
35
+ x = torch.relu(self.fc2(x))
36
+ x = torch.sigmoid(self.fc3(x))
37
+ return x
38
+
39
+ model = Moon_MLP()
40
+ optimizer = optim.Adam(model.parameters(), lr=0.01)
41
+
42
+ # 2. Initialize NeuroPlot
43
+ viz = LiveVisualizer(
44
+ plots=["boundary", "latent", "loss", "accuracy"],
45
+ model=model,
46
+ data=(x, y),
47
+ update_every=50,
48
+ save_gif=True,
49
+ gif_name="neuroplot_demo.gif",
50
+ save_best_model=True,
51
+ checkpoint_path="best_model.pth"
52
+ )
53
+
54
+ # 3. Training Loop
55
+ for epoch in range(1000):
56
+ y_pred = model(x)
57
+ loss = nn.BCELoss()(y_pred, y)
58
+
59
+ preds = (y_pred >= 0.5).float()
60
+ acc = (preds == y).float().mean().item()
61
+
62
+ optimizer.zero_grad()
63
+ loss.backward()
64
+ optimizer.step()
65
+
66
+ viz.step(epoch, loss=loss.item(), accuracy=acc)
67
+
68
+ viz.close()
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: neuroplot
3
+ Version: 0.1.1
4
+ Summary: A lightweight, modular real-time visualization and diagnostics library for PyTorch.
5
+ Description-Content-Type: text/markdown
6
+ Requires-Dist: torch
7
+ Requires-Dist: matplotlib
8
+ Requires-Dist: numpy
9
+ Requires-Dist: imageio
10
+
11
+ # NeuroPlot 🧠📊
12
+ A lightweight, modular real-time training telemetry and visualization library for PyTorch.
13
+
14
+ NeuroPlot provides live, multi-panel diagnostic monitoring during your training loops—allowing you to track decision boundaries, latent space representations, loss curves, and accuracy metrics seamlessly.
15
+
16
+ ## Features
17
+ - Live Multi-Panel Dashboard: Watch decision boundaries and latent spaces evolve in real-time alongside loss and accuracy curves.
18
+ - Automatic GIF Compilation: Automatically capture training progress and compile it into a clean GIF.
19
+ - Best-Model Checkpointing: Automatically track and save the best-performing model weights.
20
+
21
+ ## Installation
22
+ pip install neuroplot
23
+
24
+ ## Quick Start Usage Guide
25
+ import torch
26
+ import torch.nn as nn
27
+ import torch.optim as optim
28
+ import sklearn.datasets as datasets
29
+ from neuroplot import LiveVisualizer
30
+
31
+ # 1. Prepare data and model
32
+ X, y = datasets.make_moons(n_samples=100, noise=0.1)
33
+ x = torch.tensor(X, dtype=torch.float32)
34
+ y = torch.tensor(y, dtype=torch.float32).view(-1, 1)
35
+
36
+ class Moon_MLP(nn.Module):
37
+ def __init__(self):
38
+ super().__init__()
39
+ self.fc1 = nn.Linear(2, 8)
40
+ self.fc2 = nn.Linear(8, 8)
41
+ self.fc3 = nn.Linear(8, 1)
42
+
43
+ def forward(self, x):
44
+ x = torch.relu(self.fc1(x))
45
+ x = torch.relu(self.fc2(x))
46
+ x = torch.sigmoid(self.fc3(x))
47
+ return x
48
+
49
+ model = Moon_MLP()
50
+ optimizer = optim.Adam(model.parameters(), lr=0.01)
51
+
52
+ # 2. Initialize NeuroPlot
53
+ viz = LiveVisualizer(
54
+ plots=["boundary", "latent", "loss", "accuracy"],
55
+ model=model,
56
+ data=(x, y),
57
+ update_every=50,
58
+ save_gif=True,
59
+ gif_name="neuroplot_demo.gif",
60
+ save_best_model=True,
61
+ checkpoint_path="best_model.pth"
62
+ )
63
+
64
+ # 3. Training Loop
65
+ for epoch in range(1000):
66
+ y_pred = model(x)
67
+ loss = nn.BCELoss()(y_pred, y)
68
+
69
+ preds = (y_pred >= 0.5).float()
70
+ acc = (preds == y).float().mean().item()
71
+
72
+ optimizer.zero_grad()
73
+ loss.backward()
74
+ optimizer.step()
75
+
76
+ viz.step(epoch, loss=loss.item(), accuracy=acc)
77
+
78
+ viz.close()
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "neuroplot"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "A lightweight, modular real-time visualization and diagnostics library for PyTorch."
9
9
  readme = "neuroplot/README.md"
10
10
  dependencies = [
neuroplot-0.1.0/PKG-INFO DELETED
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: neuroplot
3
- Version: 0.1.0
4
- Summary: A lightweight, modular real-time visualization and diagnostics library for PyTorch.
5
- Description-Content-Type: text/markdown
6
- Requires-Dist: torch
7
- Requires-Dist: matplotlib
8
- Requires-Dist: numpy
9
- Requires-Dist: imageio
10
-
11
- # NeuroPlot 🧠📊
12
- A lightweight, real-time training telemetry and visualization library for PyTorch.
13
-
14
- ## Features
15
- - Live multi-panel monitoring (Decision boundaries, latent space representations, loss, and accuracy).
16
- - Automatic GIF compilation of training progression.
17
- - Best-model checkpointing.
18
- - Designed for mechanistic interpretability and deep learning research.
19
-
20
- ## Installation
21
- ```bash
22
- pip install neuroplot
@@ -1,12 +0,0 @@
1
- # NeuroPlot 🧠📊
2
- A lightweight, real-time training telemetry and visualization library for PyTorch.
3
-
4
- ## Features
5
- - Live multi-panel monitoring (Decision boundaries, latent space representations, loss, and accuracy).
6
- - Automatic GIF compilation of training progression.
7
- - Best-model checkpointing.
8
- - Designed for mechanistic interpretability and deep learning research.
9
-
10
- ## Installation
11
- ```bash
12
- pip install neuroplot
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: neuroplot
3
- Version: 0.1.0
4
- Summary: A lightweight, modular real-time visualization and diagnostics library for PyTorch.
5
- Description-Content-Type: text/markdown
6
- Requires-Dist: torch
7
- Requires-Dist: matplotlib
8
- Requires-Dist: numpy
9
- Requires-Dist: imageio
10
-
11
- # NeuroPlot 🧠📊
12
- A lightweight, real-time training telemetry and visualization library for PyTorch.
13
-
14
- ## Features
15
- - Live multi-panel monitoring (Decision boundaries, latent space representations, loss, and accuracy).
16
- - Automatic GIF compilation of training progression.
17
- - Best-model checkpointing.
18
- - Designed for mechanistic interpretability and deep learning research.
19
-
20
- ## Installation
21
- ```bash
22
- pip install neuroplot
File without changes
File without changes