(plot, plot_file, plot_title, train_dirs)
| 1566 | |
| 1567 | @contextmanager |
| 1568 | def 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 |
no test coverage detected