Skip to content
Snippets Groups Projects
Commit 8a473dd1 authored by carlosuc3m's avatar carlosuc3m
Browse files

refactor methods coming from the model runner

parent cf961a46
Branches
Tags
No related merge requests found
...@@ -28,7 +28,7 @@ import com.google.common.util.concurrent.AtomicDouble; ...@@ -28,7 +28,7 @@ import com.google.common.util.concurrent.AtomicDouble;
import icy.common.listener.ProgressListener; import icy.common.listener.ProgressListener;
import io.bioimage.modelrunner.versionmanagement.DeepLearningVersion; import io.bioimage.modelrunner.versionmanagement.DeepLearningVersion;
import io.bioimage.modelrunner.versionmanagement.InstalledDeepLearningVersions; import io.bioimage.modelrunner.versionmanagement.InstalledEngines;
/** /**
* Downloader for Deep Learning engine versions. * Downloader for Deep Learning engine versions.
...@@ -40,7 +40,7 @@ public class DeepLearningVersionDownloader ...@@ -40,7 +40,7 @@ public class DeepLearningVersionDownloader
/** /**
* The path where Deep Learning libraries are downloaded. * The path where Deep Learning libraries are downloaded.
*/ */
private static Path downloadsPath = Paths.get(InstalledDeepLearningVersions.getInstalledVersionsDir()).toAbsolutePath(); private static Path downloadsPath = Paths.get(InstalledEngines.getEnginesDir()).toAbsolutePath();
/** /**
* Checks if the target Downloaded version is already downloaded locally. * Checks if the target Downloaded version is already downloaded locally.
......
...@@ -15,7 +15,7 @@ import icy.preferences.XMLPreferences; ...@@ -15,7 +15,7 @@ import icy.preferences.XMLPreferences;
import icy.util.StringUtil; import icy.util.StringUtil;
import io.bioimage.modelrunner.system.PlatformDetection; import io.bioimage.modelrunner.system.PlatformDetection;
import io.bioimage.modelrunner.utils.Constants; import io.bioimage.modelrunner.utils.Constants;
import io.bioimage.modelrunner.versionmanagement.AvailableDeepLearningVersions; import io.bioimage.modelrunner.versionmanagement.AvailableEngines;
import io.bioimage.modelrunner.versionmanagement.DeepLearningVersion; import io.bioimage.modelrunner.versionmanagement.DeepLearningVersion;
import plugins.adufour.blocks.lang.Block; import plugins.adufour.blocks.lang.Block;
import plugins.adufour.blocks.util.VarList; import plugins.adufour.blocks.util.VarList;
...@@ -48,8 +48,8 @@ public class DeepLearningVersionSelector extends EzPlug implements EzStoppable, ...@@ -48,8 +48,8 @@ public class DeepLearningVersionSelector extends EzPlug implements EzStoppable,
* @return map to let naive users select the wanted DL version * @return map to let naive users select the wanted DL version
*/ */
private static Map<String, DeepLearningVersion> getDisplayMapWithoutPythonRepeated() { private static Map<String, DeepLearningVersion> getDisplayMapWithoutPythonRepeated() {
List<DeepLearningVersion> allVersions = AvailableDeepLearningVersions.loadCompatibleOnly().getVersions(); List<DeepLearningVersion> allVersions = AvailableEngines.loadCompatibleOnly().getVersions();
List<DeepLearningVersion> vList = AvailableDeepLearningVersions.removeRepeatedPythonVersions(allVersions); List<DeepLearningVersion> vList = AvailableEngines.removeRepeatedPythonVersions(allVersions);
Map<String, DeepLearningVersion> map = vList.stream() Map<String, DeepLearningVersion> map = vList.stream()
.collect(Collectors.toMap( .collect(Collectors.toMap(
v -> v.getEngine() + "-" + v.getPythonVersion() v -> v.getEngine() + "-" + v.getPythonVersion()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment