Skip to content

Commit

Permalink
Merge pull request #59 from optuna/remove-unnecessary-auth
Browse files Browse the repository at this point in the history
Remove unnecessary auth
  • Loading branch information
y0z authored May 27, 2024
2 parents c40ad83 + fd2960e commit dd2e865
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ jobs:
with:
python-version: 3.11
- name: Install
env:
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
run: |
python -m pip install -U pip
pip install --progress-bar off .
pip install --progress-bar off PyGitHub
pip install --progress-bar off git+https://${SECRET_GITHUB_TOKEN}@github.com/optuna/optunahub.git
pip install --progress-bar off git+https://github.com/optuna/optunahub.git
pip install --progress-bar off ".[docs]"
- name: Build
env:
SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
OPTUNAHUB_NO_ANALYTICS: 1
run: |
cd docs
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docs = [
"sphinx-gallery",
"matplotlib",
"optuna",
# "optunahub",
"optunahub",
]

[project.urls]
Expand Down
7 changes: 1 addition & 6 deletions recipes/001_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
# First of all, import `optuna`, `optunahub`, and other required modules.
from __future__ import annotations

import os
from typing import Any

from github import Auth
import matplotlib.pyplot as plt
import numpy as np
import optuna
Expand All @@ -47,10 +45,7 @@
# `force_reload=True` argument forces downloading the sampler from the registry.
# If we set `force_reload` to `False`, we use the cached data in our local storage if available.

SimpleSampler = optunahub.load_module(
"samplers/simple",
auth=Auth.Token(os.environ["SECRET_GITHUB_TOKEN"]),
).SimpleSampler
SimpleSampler = optunahub.load_module("samplers/simple").SimpleSampler


class MySampler(SimpleSampler): # type: ignore
Expand Down

0 comments on commit dd2e865

Please sign in to comment.