def main(): """ Main entry point. """ try: cmdline = args_parse() context = utils.platform(cmdline.platform, cmdline.credentials, cmdline.user, cmdline.password) # create new machine learning task task_definition = { "aggregator": "neural_network.Aggregator", "participant": "neural_network.Participant", "quorum": 2, "round": 5, "epoch": 2, "batch_size": 256, "learning_rate": 0.001, "training_size": 10000, "test_size": 1000, } result = create_task(context, cmdline.task_name, task_definition) LOGGER.debug(result) LOGGER.info('Task created.') except Exception as err: LOGGER.error('Error: %s', err) raise err
def main(): """ Main entry point. """ try: cmdline = args_parse() context = utils.platform(cmdline.platform, cmdline.credentials) create_user(context, cmdline.user, cmdline.password, cmdline.org) LOGGER.info('User %s created', cmdline.user) except Exception as err: LOGGER.error('Error: %s', err)
def main(): """ Main entry point. """ try: cmdline = args_parse() context = utils.platform(cmdline.platform, cmdline.credentials, cmdline.user, cmdline.password) run(context, cmdline.task_name) except Exception as err: LOGGER.error('Error: %s', err) raise err
def main(): """ Main entry point. """ try: cmdline = args_parse() context = utils.platform(cmdline.platform, cmdline.credentials, cmdline.user, cmdline.password) tasks = get_tasks(context) for task in tasks: LOGGER.info(f"{task['task_name']} - {task['status']}") except Exception as err: LOGGER.error('Error: %s', err)