From 0e10ac99e8e2e906aaaf5850109bf76211379e8a Mon Sep 17 00:00:00 2001 From: didayolo Date: Tue, 13 Jun 2023 23:30:55 +0200 Subject: [PATCH 1/6] More robust handling of metadata command in compute worker --- compute_worker/compute_worker.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/compute_worker/compute_worker.py b/compute_worker/compute_worker.py index 152ab2d0e..5057e3778 100644 --- a/compute_worker/compute_worker.py +++ b/compute_worker/compute_worker.py @@ -497,9 +497,16 @@ async def _run_program_directory(self, program_dir, kind, can_be_output=False): logger.info(f"Metadata path is {os.path.join(program_dir, metadata_path)}") with open(os.path.join(program_dir, metadata_path), 'r') as metadata_file: - metadata = yaml.load(metadata_file.read(), Loader=yaml.FullLoader) - logger.info(f"Metadata contains:\n {metadata}") - command = metadata.get("command") if metadata is not None else None # in case the file exists but is empty + try: # try to find a command in the metadata, in other cases set metadata to None + metadata = yaml.load(metadata_file.read(), Loader=yaml.FullLoader) + logger.info(f"Metadata contains:\n {metadata}") + if isinstance(metadata, dict): # command found + command = metadata.get("command") + else: + command = None + except yaml.YAMLError as e: + print("Error parsing YAML file: ", e) + command = None if not command and kind == "ingestion": raise SubmissionException("Program directory missing 'command' in metadata") elif not command: From f37b84cd6d3395f54be263063fa56f5a79dad8f5 Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Wed, 14 Jun 2023 21:15:42 +0500 Subject: [PATCH 2/6] docker image name displayed --- .../riot/competitions/detail/_header.tag | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/static/riot/competitions/detail/_header.tag b/src/static/riot/competitions/detail/_header.tag index 55950fa64..7b1bbd5ef 100644 --- a/src/static/riot/competitions/detail/_header.tag +++ b/src/static/riot/competitions/detail/_header.tag @@ -47,7 +47,14 @@
Secret url: https://{ URLS.SECRET_KEY_URL(competition.id, competition.secret_key) } - + + + +
+
+ Docker image: + { competition.docker_image } +
@@ -207,7 +214,17 @@ window.getSelection().addRange(range); // to select text document.execCommand("copy"); window.getSelection().removeAllRanges();// to deselect - $('.send-pop').popup('toggle') + $('.send-pop-secret').popup('toggle') + } + + self.copy_docker_url = function () { + let range = document.createRange(); + range.selectNode(document.getElementById("docker-image")); + window.getSelection().removeAllRanges(); // clear current selection + window.getSelection().addRange(range); // to select text + document.execCommand("copy"); + window.getSelection().removeAllRanges();// to deselect + $('.send-pop-docker').popup('toggle') } self.get_end_date = function (competition) { @@ -251,6 +268,9 @@ .secret-label color #DB2828 + .docker-label + color #2290E2 + .secret-url color $blue From 900d2b8b0c00f15250dde8657e8046a7d03884dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Pav=C3=A3o?= Date: Thu, 15 Jun 2023 13:12:21 +0200 Subject: [PATCH 3/6] Update Dockerfile --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a67ff1f3..93541187f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.8 -RUN apt-get update && apt-get install -yy gcc build-essential python-setuptools +RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/* ENV PYTHONUNBUFFERED 1 @@ -9,6 +9,4 @@ ADD requirements.txt . RUN pip install -U pip RUN pip install -r requirements.dev.txt -# INSTALL CHROMEDRIVER HERE? - WORKDIR /app From 09321004c1c083b53b8d2bc9601fac1641f97e89 Mon Sep 17 00:00:00 2001 From: didayolo Date: Thu, 15 Jun 2023 13:36:06 +0200 Subject: [PATCH 4/6] Update color and order of docker image display --- .../riot/competitions/detail/_header.tag | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/static/riot/competitions/detail/_header.tag b/src/static/riot/competitions/detail/_header.tag index 7b1bbd5ef..3b34c066f 100644 --- a/src/static/riot/competitions/detail/_header.tag +++ b/src/static/riot/competitions/detail/_header.tag @@ -32,6 +32,7 @@
+
Organized by: {competition.created_by} @@ -44,13 +45,7 @@ Current server time: {pretty_date(CURRENT_DATE_TIME)}
-
- Secret url: - https://{ URLS.SECRET_KEY_URL(competition.id, competition.secret_key) } - - - -
+
Docker image: { competition.docker_image } @@ -58,6 +53,14 @@
+ +
+ Secret url: + https://{ URLS.SECRET_KEY_URL(competition.id, competition.secret_key) } + + + +
@@ -249,6 +252,7 @@ $blue = #2c3f4c $teal = #00bbbb $lightblue = #f2faff + $red = #DB2828 .detail-label font-size 1.25em @@ -266,10 +270,10 @@ font-size 13px .secret-label - color #DB2828 + color $red .docker-label - color #2290E2 + color $teal .secret-url color $blue From f8eeaf7c8f2a61703fe156db8f6ffc9e0a5e475c Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Thu, 15 Jun 2023 18:23:33 +0500 Subject: [PATCH 5/6] Codabench citation (#945) * citation added * stylus updated * citation added * stylus updated * citation header changed, bib fixed * Clickable link to the paper --------- Co-authored-by: didayolo --- src/static/stylus/home.styl | 13 +++++++++++++ src/templates/pages/home.html | 28 +++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/static/stylus/home.styl b/src/static/stylus/home.styl index 5a0675e6c..3a3e06601 100644 --- a/src/static/stylus/home.styl +++ b/src/static/stylus/home.styl @@ -226,6 +226,19 @@ body .color-header color #4a4a4a +#cite-container + padding 2em + align-items left + + +#cite-container .row + margin 2em + padding 1em !important + background-color #F8F9FA + +#cite-container pre + text-align left + .footer.segment padding 2em margin 1em 7.5em diff --git a/src/templates/pages/home.html b/src/templates/pages/home.html index 1d7cef45f..9f9963958 100644 --- a/src/templates/pages/home.html +++ b/src/templates/pages/home.html @@ -32,7 +32,7 @@

- +
About CodaBench @@ -68,6 +68,7 @@

+
{% for stat in general_stats %}
@@ -83,6 +84,7 @@

{% endfor %}

+
About CodaBench @@ -330,6 +332,30 @@

Homework

+ + +
+
+ Cite Codabench in your research +
+
+
+@article{codabench,
+    title = {Codabench: Flexible, easy-to-use, and reproducible meta-benchmark platform},
+    author = {Zhen Xu and Sergio Escalera and Adrien Pavão and Magali Richard and 
+                Wei-Wei Tu and Quanming Yao and Huan Zhao and Isabelle Guyon},
+    journal = {Patterns},
+    volume = {3},
+    number = {7},
+    pages = {100543},
+    year = {2022},
+    issn = {2666-3899},
+    doi = {https://doi.org/10.1016/j.patter.2022.100543},
+    url = {https://www.sciencedirect.com/science/article/pii/S2666389922001465}
+} 
+
+
+
{% endblock %} From 0d4ca20584c800e5dfab68da1c9fe9cfea8b3ac2 Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Thu, 15 Jun 2023 20:02:31 +0500 Subject: [PATCH 6/6] rename about, change github and tutorial links (#951) * rename about, change github and tutorial links * popular/featured benchmarks are now links to competitions/public --- .../riot/competitions/tile/front_page_competitions.tag | 4 ++-- src/templates/pages/home.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/static/riot/competitions/tile/front_page_competitions.tag b/src/static/riot/competitions/tile/front_page_competitions.tag index 4d48da314..a24f83823 100644 --- a/src/static/riot/competitions/tile/front_page_competitions.tag +++ b/src/static/riot/competitions/tile/front_page_competitions.tag @@ -2,7 +2,7 @@
- Popular Benchmarks + Popular Benchmarks