예제 #1
0
 def test_base_runner_debug(self, _, __):
   """Tests that shell base-runner-debug works as intended."""
   image_name = 'base-runner-debug'
   unparsed_args = ['shell', image_name]
   parser = helper.get_parser()
   args = helper.parse_args(parser, unparsed_args)
   args.sanitizer = 'address'
   result = helper.shell(args)
   self.assertTrue(result)
예제 #2
0
import helper

if __name__ == "__main__":

    parser = helper.get_parser()
    args = parser.parse_args()
    helper.generate_beat("metricbeat", args)

예제 #3
0
        callbacks=[],
        weights_save_path=params.save_path,
        replace_sampler_ddp=False,  # for hpc
        limit_test_batches=params.limit_val_batches,
        benchmark=False  # cudnn benchmark
    )

    if params.mode == 'test':
        trainer.test(model)
    if params.mode == 'train':
        trainer.fit(model)


if __name__ == "__main__":
    parser = argparse.ArgumentParser()

    parser.add_argument("--is_slurm",
                        action="store_true",
                        help="whether to run in slurm")
    args = parser.parse_known_args()[0]

    if args.is_slurm is True:
        # submit job to slurm
        parser, lt_system = get_parser(parent=parser)
        parser = slurm_parser(parser)
        run_cluster(parser, main, lt_system)
    else:
        # add Lightning parse
        parser, lt_system = get_parser(parent=parser)
        params = parser.parse_args()
        main(params, lt_system)