From dbd500f2eb160f9a3f2a7781f00b0a29425d2373 Mon Sep 17 00:00:00 2001 From: y0z Date: Thu, 14 Nov 2024 12:00:46 +0900 Subject: [PATCH 1/2] Update example --- template/example.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/template/example.py b/template/example.py index ee95f9e4..42f59a7d 100644 --- a/template/example.py +++ b/template/example.py @@ -18,17 +18,19 @@ def objective(trial: optuna.Trial) -> float: # TODO: Change the variables here to test your package. package_name = "samplers/your_sampler" -repo_owner = "Your GitHub Account Name" -ref = "Your Git Branch Name" test_local = True if test_local: + # This is an example of how to load a sampler from your local optunahub-registry. sampler = optunahub.load_local_module( - package=package_name, registry_root="./package/" + package=package_name, + registry_root="./", # Path to the root of the optunahub-registry. ).YourSampler() else: + # This is an example of how to load a sampler from your fork of the optunahub-registry. + # Please remove repo_owner and ref arguments before submitting a pull request. sampler = optunahub.load_module( - package=package_name, repo_owner=repo_owner, ref=ref + package=package_name, repo_owner="Your GitHub Account ID", ref="Your Git Branch Name" ).YourSampler() study = optuna.create_study(sampler=sampler) From 865b0556206b7cc17929bb5ac1dbe9e6e60efceb Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:22:15 +0900 Subject: [PATCH 2/2] Update template/example.py Co-authored-by: Naoto Mizuno --- template/example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/example.py b/template/example.py index 42f59a7d..b7d249d4 100644 --- a/template/example.py +++ b/template/example.py @@ -16,7 +16,7 @@ def objective(trial: optuna.Trial) -> float: return x**2 + y**2 -# TODO: Change the variables here to test your package. +# TODO: Change package_name to test your package. package_name = "samplers/your_sampler" test_local = True