From 1a25a32cc090c1f39e6af66ccfb37bc5c7b19ce2 Mon Sep 17 00:00:00 2001 From: hrntsm Date: Thu, 28 Dec 2023 17:45:38 +0900 Subject: [PATCH 1/3] Fix tunny env path --- Tunny/Util/TunnyVariables.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tunny/Util/TunnyVariables.cs b/Tunny/Util/TunnyVariables.cs index e262c3fd..9e550e88 100644 --- a/Tunny/Util/TunnyVariables.cs +++ b/Tunny/Util/TunnyVariables.cs @@ -5,7 +5,7 @@ namespace Tunny.Util { public static class TunnyVariables { - public static string TunnyEnvPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + ".tunny_env"); + public static string TunnyEnvPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".tunny_env"); public static string OptimizeSettingsPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".tunny_env", "settings.json"); } } From 4da969da78f6303b302c75f450fa3f2875d03efa Mon Sep 17 00:00:00 2001 From: hrntsm Date: Thu, 28 Dec 2023 17:46:07 +0900 Subject: [PATCH 2/3] Fix to use tunny env path to run optuna dashboard --- Tunny/UI/LoadingInstruction.cs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Tunny/UI/LoadingInstruction.cs b/Tunny/UI/LoadingInstruction.cs index 49e5e19d..f4de6a72 100644 --- a/Tunny/UI/LoadingInstruction.cs +++ b/Tunny/UI/LoadingInstruction.cs @@ -8,7 +8,6 @@ using Grasshopper.GUI.Canvas; using Grasshopper.Kernel; -using Tunny.Handler; using Tunny.Resources; using Tunny.Settings; using Tunny.Util; @@ -85,10 +84,8 @@ private List TunnyMenuItems private void OptunaDashboardToolStripMenuItem_Click(object sender, EventArgs e) { - string componentFolder = Path.GetDirectoryName(Grasshopper.Instances.ComponentServer.FindObjectByName("Tunny", true, true).Location); - - string pythonDirectory = PythonInstaller.GetEmbeddedPythonPath(); - string dashboardPath = pythonDirectory + "/Scripts/optuna-dashboard.exe"; + string pythonDirectory = Path.Combine(TunnyVariables.TunnyEnvPath, "python"); + string dashboardPath = Path.Combine(pythonDirectory, "Scripts", "optuna-dashboard.exe"); if (!Directory.Exists(pythonDirectory) && !File.Exists(dashboardPath)) { @@ -99,13 +96,13 @@ private void OptunaDashboardToolStripMenuItem_Click(object sender, EventArgs e) } else { - RunOptunaDashboard(componentFolder, dashboardPath); + RunOptunaDashboard(dashboardPath); } } - private static void RunOptunaDashboard(string componentFolder, string dashboardPath) + private static void RunOptunaDashboard(string dashboardPath) { - string settingsPath = componentFolder + @"\Settings.json"; + string settingsPath = TunnyVariables.OptimizeSettingsPath; string storagePath = string.Empty; if (File.Exists(settingsPath)) { From 6147ade28f5f1fac9b5e879a4ebd418997a0a8dc Mon Sep 17 00:00:00 2001 From: hrntsm Date: Thu, 28 Dec 2023 17:46:16 +0900 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65d82cb8..9dd34e5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,12 @@ for new features. ### Changed -for changes in existing functionality. +- Tunny Python runtime environment location to [UserProfile]/.tunny_env +- Moved settings file location to [UserProfile]/.tunny_env +- Storage's default path to the desktop. + - Previously, it was in the same folder as the Tunny component .gha file. +- Default StudyName set to empty. + - If you don't input a name in Tunny UI, Optuna will automatically assign a StudyName. ### Deprecated @@ -28,9 +33,8 @@ for now removed features. ### Fixed -for any bug fixes. - - The seed value of the sampler was not used. +- Failure to launch Optuna-Dashboard from tab. ### Security