From 0d9dda13b756b28f24d9509e2210a83822961056 Mon Sep 17 00:00:00 2001 From: Arthur Flam Date: Fri, 24 Jul 2020 14:26:22 +0300 Subject: [PATCH 1/2] Remove unused imports --- webapp/src/utils.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/webapp/src/utils.js b/webapp/src/utils.js index 651cf59d..411a3b67 100755 --- a/webapp/src/utils.js +++ b/webapp/src/utils.js @@ -1,13 +1,8 @@ -import React from "react"; - import { interpolateRainbow } from "d3-scale-chromatic"; -import md5 from "js-md5"; import { median as mathjs_median } from "mathjs/number"; import { levenshtein } from "./levenshtein"; +import md5 from "js-md5"; -import { ExtraParametersTags, ConfigurationsTags, PlatformTag } from './components/tags' - -// import math from '@mathjs'; const calendarStrings = { lastDay: "[Yesterday]", From 62aa556cd8a056f880a6c300c36ab8b1c26fa3ba Mon Sep 17 00:00:00 2001 From: Arthur Flam Date: Fri, 24 Jul 2020 15:02:22 +0300 Subject: [PATCH 2/2] Better choice of default runner --- qaboard/qa.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qaboard/qa.py b/qaboard/qa.py index 60abf1a6..7c6be4cb 100755 --- a/qaboard/qa.py +++ b/qaboard/qa.py @@ -356,11 +356,14 @@ def sync(ctx, input_path, output_path): notify_qa_database(**ctx.obj, metrics=metrics, is_pending=False, is_running=False) click.secho(str(metrics), fg='green') - +runners_config = config.get('runners', {}) +if 'default' in runners_config: + default_runner = runners_config['default'] +else: + task_runners = [r for r in runners_config if r not in ['default', 'local']] + default_runner = task_runners[0] if task_runners else 'local' lsf_config = config['lsf'] if 'lsf' in config else config.get('runners', {}).get('lsf', {}) local_config = config.get('runners', {}).get('local', {}) -# FIXME: change how we pick the default task runner -# task_runners = [r for r in config.get('runners', {}).keys() if r not in ['default', 'local']] @qa.command(context_settings=dict( ignore_unknown_options=True, )) @@ -372,7 +375,7 @@ def sync(ctx, input_path, output_path): @click.option('--list', 'list_contexts', is_flag=True, help="Print as JSON details about each run we would do.") @click.option('--list-output-dirs', is_flag=True, help="Only print the prefixes for the results of each batch we run on.") @click.option('--list-inputs', is_flag=True, help="Print to stdout a JSON with a list of the inputs we would call qa run on.") -@click.option('--runner', default=config.get('runners', {}).get('default', 'celery' if os.name!='nt' else 'local'), help="Run runs locally or using a task queue like Celery, LSF...") +@click.option('--runner', default=default_runner, help="Run runs locally or using a task queue like Celery, LSF...") @click.option('--local-concurrency', default=os.environ.get('QA_BATCH_CONCURRENCY', local_config.get('concurrency')), type=int, help="joblib's n_jobs: 0=unlimited, 2=2 at a time, -1=#cpu-1") @click.option('--lsf-threads', default=lsf_config.get('threads', 0), type=int, help="restrict number of lsf threads to use. 0=no restriction") @click.option('--lsf-memory', default=lsf_config.get('memory', 0), help="restrict memory (MB) to use. 0=no restriction")