You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# For Production - real CA-signed certificate (default)
247
+
vis = visdom.Visdom(server="https://myserver.com")
248
+
249
+
# For Development - self signed certificate
250
+
vis = visdom.Visdom(server="https://localhost", ssl_verify=False)
251
+
```
252
+
253
+
> **Note**: `ssl_verify=False` disables certificate verification and should only be used in development with self-signed certificates. Do not use in production.
254
+
255
+
230
256
#### Python example
231
257
```python
232
258
import visdom
@@ -382,6 +408,49 @@ with VisdomLogger(viz, env="my_run", log_every=50) as tracker:
382
408
383
409
Each unique name passed to `tracker.log()` gets its own window. The first call creates it; subsequent calls append. See `example/train_example.py` for a full working example.
384
410
411
+
### scikit-learn
412
+
413
+
`visdom.loggers.VisdomSklearnLogger` patches all sklearn `fit()` calls so every estimator trained after `autolog()` logs to Visdom automatically — no per-estimator code needed.
414
+
415
+
**Plain estimators** (classifiers, regressors, clusterers) produce a text pane with the estimator name, dataset shape, training score, fit time, and all hyperparameters.
416
+
417
+
**GridSearchCV / RandomizedSearchCV** produce a bar chart of `mean_test_score` per parameter combination and a text pane with `best_score_`, `best_params_`, and fit time.
418
+
419
+
```python
420
+
import visdom
421
+
from visdom.loggers import VisdomSklearnLogger
422
+
from sklearn.ensemble import RandomForestClassifier
423
+
from sklearn.linear_model import Ridge
424
+
from sklearn.model_selection import GridSearchCV
425
+
426
+
viz = visdom.Visdom()
427
+
VisdomSklearnLogger.autolog()
428
+
429
+
clf = RandomForestClassifier(n_estimators=100)
430
+
clf.fit(X_train, y_train) # -> text pane
431
+
432
+
reg = Ridge(alpha=1.0)
433
+
reg.fit(X_train, y_train) # -> text pane
434
+
435
+
gs = GridSearchCV(clf, param_grid, cv=3)
436
+
gs.fit(X_train, y_train) # -> bar chart + text pane
437
+
```
438
+
439
+
If you have a custom Visdom connection (non-default port, remote server, auth), pass it explicitly:
440
+
441
+
```python
442
+
import visdom
443
+
444
+
viz = visdom.Visdom(port=8098, server="http://myserver")
0 commit comments