MCPcopy Create free account
hub / github.com/catboost/catboost / plot_wrapper

Function plot_wrapper

catboost/python-package/catboost/core.py:1568–1578  ·  view source on GitHub ↗
(plot, plot_file, plot_title, train_dirs)

Source from the content-addressed store, hash-verified

1566
1567@contextmanager
1568def plot_wrapper(plot, plot_file, plot_title, train_dirs):
1569 if plot:
1570 widget = _get_catboost_widget(train_dirs)
1571 widget._run_update()
1572 try:
1573 yield
1574 finally:
1575 if plot:
1576 widget._stop_update()
1577 if plot_file is not None:
1578 OfflineMetricVisualizer(train_dirs).save_to_file(plot_title, plot_file)
1579
1580
1581# the first element of the synonyms list is the canonical name

Callers 6

_fitMethod · 0.85
_eval_metricsMethod · 0.85
compareMethod · 0.85
_tune_hyperparamsMethod · 0.85
select_featuresMethod · 0.85
cvFunction · 0.85

Calls 5

_get_catboost_widgetFunction · 0.85
_run_updateMethod · 0.80
_stop_updateMethod · 0.80
save_to_fileMethod · 0.80

Tested by

no test coverage detected