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
@@ -391,6 +417,49 @@ with VisdomLogger(viz, env="my_run", log_every=50) as tracker:
391
417
392
418
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.
393
419
420
+
### scikit-learn
421
+
422
+
`visdom.loggers.VisdomSklearnLogger` patches all sklearn `fit()` calls so every estimator trained after `autolog()` logs to Visdom automatically — no per-estimator code needed.
423
+
424
+
**Plain estimators** (classifiers, regressors, clusterers) produce a text pane with the estimator name, dataset shape, training score, fit time, and all hyperparameters.
425
+
426
+
**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.
427
+
428
+
```python
429
+
import visdom
430
+
from visdom.loggers import VisdomSklearnLogger
431
+
from sklearn.ensemble import RandomForestClassifier
432
+
from sklearn.linear_model import Ridge
433
+
from sklearn.model_selection import GridSearchCV
434
+
435
+
viz = visdom.Visdom()
436
+
VisdomSklearnLogger.autolog()
437
+
438
+
clf = RandomForestClassifier(n_estimators=100)
439
+
clf.fit(X_train, y_train) # -> text pane
440
+
441
+
reg = Ridge(alpha=1.0)
442
+
reg.fit(X_train, y_train) # -> text pane
443
+
444
+
gs = GridSearchCV(clf, param_grid, cv=3)
445
+
gs.fit(X_train, y_train) # -> bar chart + text pane
446
+
```
447
+
448
+
If you have a custom Visdom connection (non-default port, remote server, auth), pass it explicitly:
449
+
450
+
```python
451
+
import visdom
452
+
453
+
viz = visdom.Visdom(port=8098, server="http://myserver")
0 commit comments