From 90671e8904a7edcf772115f73a4a20a00fbf7278 Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Mon, 27 Sep 2021 19:19:16 +0200
Subject: [PATCH 1/3] Add the version tag to the image name if present
---
amlb/runners/container.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/amlb/runners/container.py b/amlb/runners/container.py
index 2cf2f4307..3a0b10fa5 100644
--- a/amlb/runners/container.py
+++ b/amlb/runners/container.py
@@ -182,7 +182,8 @@ def _build_image(self, cache=True):
image = self._container_image_name(dev)
if not image:
- image = self._container_image_name()
+ version_tag = next((t for t in tags if t.startswith("v")), None)
+ image = self._container_image_name(version_tag)
self._run_container_build_command(image, cache)
return image
From 8ae59fdd6821132629f39e38641b760fcfcfc758 Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Mon, 27 Sep 2021 19:35:52 +0200
Subject: [PATCH 2/3] Fix casing for MLNet framework definition
---
resources/frameworks_2021Q3.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/resources/frameworks_2021Q3.yaml b/resources/frameworks_2021Q3.yaml
index 17426b0e7..b92118342 100644
--- a/resources/frameworks_2021Q3.yaml
+++ b/resources/frameworks_2021Q3.yaml
@@ -50,7 +50,7 @@ mljarsupervised_benchmark:
params:
mode: Compete
-MLNET:
+MLNet:
version: '16.5.26'
MLPlan:
From 58966cc1e63fabe6f0b80df97f2864f3e2d15e67 Mon Sep 17 00:00:00 2001
From: PGijsbers
Date: Mon, 27 Sep 2021 19:48:08 +0200
Subject: [PATCH 3/3] Make version tag matching more precise
and error out of it is ambiguous
---
amlb/runners/container.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/amlb/runners/container.py b/amlb/runners/container.py
index 3a0b10fa5..f33f220ab 100644
--- a/amlb/runners/container.py
+++ b/amlb/runners/container.py
@@ -182,7 +182,14 @@ def _build_image(self, cache=True):
image = self._container_image_name(dev)
if not image:
- version_tag = next((t for t in tags if t.startswith("v")), None)
+ tags = rget().git_info.tags
+ version_tags = [t for t in tags if re.match(r"v\d+(\d+.)*", t)]
+ if len(version_tags) > 1:
+ raise InvalidStateError(
+ "The image can't be built as more than one version tag was found."
+ f"Found tags: {version_tags}"
+ )
+ version_tag = next(iter(version_tags), None)
image = self._container_image_name(version_tag)
self._run_container_build_command(image, cache)
return image