leaf icon indicating copy to clipboard operation
leaf copied to clipboard

plots.py and names of metrics files

Open colin-byrneireland opened this issue 5 years ago • 7 comments

The documentations states that The plots shown below can be generated using plots.py file in the repo root. I don't appear to be able to locate this file though.

Also a statistical files metrics to leaf/models/metrics/stat_metrics.csv and leaf/models/metrics/sys_metrics.csv, they appear to be called metrics_stat.csv metrics_sys.csv.

Can you clarify the correct file names please.

colin-byrneireland avatar Feb 17 '20 17:02 colin-byrneireland

I have the same problem...

rey-sh avatar Mar 06 '20 09:03 rey-sh

Have you guys solved this problem?

pentium3 avatar Apr 23 '20 17:04 pentium3

With a little tweak to the visualization_utils.py I am able to plot some of the figures, though I still think that a critical file is missing.

PeteBai avatar Sep 05 '20 03:09 PeteBai

I am also looking for the plotting script. Has anyone got the script? @PeteBai with visualization_utils.py, are you able to plot the exact figures mentioned in the paper?

mustansarsaeed avatar Sep 09 '20 07:09 mustansarsaeed

I got the same problem...

pengj97 avatar Oct 14 '21 07:10 pengj97

I got the same problem

1ych avatar Mar 03 '22 01:03 1ych

you should read the code and change the error. in the main.py file, I believe the following is the right.

you guys please correct the code, I just don't know how to paste the code correctly.

def get_stat_writer_function(ids, groups, num_samples, args):
    def writer_fn(num_round, metrics, partition):
        metrics_writer.print_metrics(
            num_round, ids, metrics, groups, num_samples, partition, args.metrics_dir, '{}_{}'.format( 'stat',args.metrics_name))
            #num_round, ids, metrics, groups, num_samples, partition, args.metrics_dir, '{}_{}'.format(args.metrics_name, 'stat'))
    return writer_fn


def get_sys_writer_function(args):
    def writer_fn(num_round, ids, metrics, groups, num_samples):
        metrics_writer.print_metrics(
            num_round, ids, metrics, groups, num_samples, 'train', args.metrics_dir, '{}_{}'.format('sys',args.metrics_name))
            #num_round, ids, metrics, groups, num_samples, 'train', args.metrics_dir, '{}_{}'.format(args.metrics_name, 'sys'))
    return writer_fn

``

ZhengtianZhu avatar Oct 16 '22 11:10 ZhengtianZhu