diff --git a/template/example.py b/template/example.py index ee95f9e4..b7d249d4 100644 --- a/template/example.py +++ b/template/example.py @@ -16,19 +16,21 @@ 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" -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)