Exemple #1
0
def generate_plot(fig, out_path=None, out_filename=None, axis_count=None):
    if axis_count is not None:
        update_axis(fig, axis_count)

    if out_path is None or out_filename is None:
        iplot(fig)
    else:
        fp.create_directory(out_path)
        out_filename = f'{out_filename}.html' if '.html' not in out_filename else out_filename
        out_file = f'{out_path}{out_filename}'
        plot(fig, filename=out_file, auto_open=False)

        print(f'Generated: {out_file}')
Exemple #2
0
def generate_plot(fig, out_path=None, out_filename=None, to_image=False):
    if out_path is None or out_filename is None:
        iplot(fig)
    else:
        fp.create_directory(out_path)
        out_filename = f'{out_filename}.html' if '.html' not in out_filename else out_filename
        out_file     = f'{out_path}{out_filename}'

        if to_image:
            out_file = out_file.replace('.html', '.png')
            fig.write_image(out_file)
        else:
            plot(fig, filename=out_file, auto_open=False)
        
        print(f'Generated: {out_file}')
 def save_model_checkpoint(self, out_path, filename):
     fileproc.create_directory(out_path)
     self.model.save(f'{out_path}{filename}')
 def model_diagram(self, out_path, filename):
     fileproc.create_directory(out_path)
     plot_model(self.model,
                to_file=f'{out_path}{filename}.png',
                show_shapes=True,
                rankdir='LR')