Skip to content

Commit

Permalink
fix: remove hardcoded api url
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvis8x7b committed Jun 12, 2024
1 parent 2b10627 commit 6227e6a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
5 changes: 1 addition & 4 deletions commons/human_feedback/dojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
RankingCriteria,
)

load_dotenv()


DOJO_API_BASE_URL = "***REMOVED***"
from template import DOJO_API_BASE_URL


class DojoAPI:
Expand Down
3 changes: 1 addition & 2 deletions dojo_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
from rich.console import Console

import bittensor
from template import DOJO_API_BASE_URL

console = Console()

DOJO_API_BASE_URL = "***REMOVED***"


def success(message: str, emoji: str = ":white_check_mark:"):
console.print(f"{emoji} [green]{message}[/green]")
Expand Down
23 changes: 7 additions & 16 deletions template/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
# The MIT License (MIT)
# Copyright © 2023 Yuma Rao
# Copyright © 2023 Tensorplex Labs
import os
from dotenv import load_dotenv

# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all copies or substantial portions of
# the Software.

# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
load_dotenv()

# Define the version of the template module.
__version__ = "0.0.1"
Expand Down Expand Up @@ -68,3 +55,7 @@
]

TASK_DEADLINE = 8 * 60 * 60

DOJO_API_BASE_URL = os.getenv("DOJO_API_BASE_URL")
if DOJO_API_BASE_URL is None:
raise ValueError("DOJO_API_BASE_URL is not set in the environment")

0 comments on commit 6227e6a

Please sign in to comment.