Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ Open http://localhost:3001 and you should see the setup interface.

Select your desired node and model config and click continue.

> **Note:**
When running in remote mode, Parallax will use a public relay server to help establish connections between the scheduler and nodes. The public relay server will receive the IP information of both the scheduler and the nodes in order to facilitate this connection.

#### Step 3: Connect your nodes

Copy the generated join command line to your node and run. For remote connection, you can find your scheduler-address in the scheduler logs.
Expand Down
4 changes: 2 additions & 2 deletions src/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from backend.server.scheduler_manage import SchedulerManage
from backend.server.server_args import parse_args
from backend.server.static_config import get_model_list, get_node_join_command
from common.file_util import get_project_root
from common.version_check import check_latest_release
from parallax_utils.ascii_anime import display_parallax_run
from parallax_utils.file_util import get_project_root
from parallax_utils.logging_config import get_logger, set_log_level
from parallax_utils.version_check import check_latest_release

app = FastAPI()

Expand Down
2 changes: 1 addition & 1 deletion src/backend/server/request_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from starlette.concurrency import iterate_in_threadpool

from backend.server.constants import NODE_STATUS_AVAILABLE
from common.request_metrics import get_request_metrics
from parallax_utils.logging_config import get_logger
from parallax_utils.request_metrics import get_request_metrics

logger = get_logger(__name__)

Expand Down
23 changes: 15 additions & 8 deletions src/parallax/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import machineid
import requests

from common.file_util import get_project_root
from common.version_check import get_current_version
from parallax.server.server_info import HardwareInfo
from parallax_utils.file_util import get_project_root
from parallax_utils.logging_config import get_logger
from parallax_utils.version_check import get_current_version

logger = get_logger("parallax.cli")

Expand All @@ -47,7 +47,7 @@
def check_python_version():
"""Check if Python version is 3.11 or higher."""
if sys.version_info < (3, 11) or sys.version_info >= (3, 14):
print(
logger.info(
f"Error: Python 3.11 or higher and less than 3.14 is required. Current version is {sys.version_info.major}.{sys.version_info.minor}."
)
sys.exit(1)
Expand Down Expand Up @@ -185,7 +185,7 @@ def run_command(args, passthrough_args: list[str] | None = None):
backend_main = project_root / "src" / "backend" / "main.py"

if not backend_main.exists():
print(f"Error: Backend main.py not found at {backend_main}")
logger.info(f"Error: Backend main.py not found at {backend_main}")
sys.exit(1)

# Build the command to run the backend main.py
Expand All @@ -201,6 +201,9 @@ def run_command(args, passthrough_args: list[str] | None = None):
cmd.extend(["--init-nodes-num", str(args.init_nodes_num)])
if args.use_relay:
cmd.extend(_get_relay_params())
logger.info(
"Using public relay server to help nodes and the scheduler establish a connection (remote mode). Your IP address will be reported to the relay server to help establish the connection."
)

# Append any passthrough args (unrecognized by this CLI) directly to the command
if passthrough_args:
Expand All @@ -220,7 +223,7 @@ def join_command(args, passthrough_args: list[str] | None = None):
launch_script = project_root / "src" / "parallax" / "launch.py"

if not launch_script.exists():
print(f"Error: Launch script not found at {launch_script}")
logger.info(f"Error: Launch script not found at {launch_script}")
sys.exit(1)

# Set environment variable for the subprocess
Expand All @@ -247,8 +250,10 @@ def join_command(args, passthrough_args: list[str] | None = None):
if args.use_relay or (
args.scheduler_addr != "auto" and not str(args.scheduler_addr).startswith("/")
):
logger.info("Using public relay servers")
cmd.extend(_get_relay_params())
logger.info(
"Using public relay server to help nodes and the scheduler establish a connection (remote mode). Your IP address will be reported to the relay server to help establish the connection."
)

# Append any passthrough args (unrecognized by this CLI) directly to the command
if passthrough_args:
Expand All @@ -266,7 +271,7 @@ def chat_command(args, passthrough_args: list[str] | None = None):
launch_script = project_root / "src" / "parallax" / "launch_chat.py"

if not launch_script.exists():
print(f"Error: Launch chat script not found at {launch_script}")
logger.info(f"Error: Launch chat script not found at {launch_script}")
sys.exit(1)

# Build the command to run the launch_chat.py script
Expand All @@ -279,8 +284,10 @@ def chat_command(args, passthrough_args: list[str] | None = None):
if args.use_relay or (
args.scheduler_addr != "auto" and not str(args.scheduler_addr).startswith("/")
):
logger.info("Using public relay servers")
cmd.extend(_get_relay_params())
logger.info(
"Using public relay server to help chat client and the scheduler establish a connection (remote mode). Your IP address will be reported to the relay server to help establish the connection."
)

# Append any passthrough args (unrecognized by this CLI) directly to the command
if passthrough_args:
Expand Down
2 changes: 1 addition & 1 deletion src/parallax/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
import tempfile
import threading

from common.version_check import check_latest_release
from parallax.p2p.server import ServerState, launch_p2p_server
from parallax.server.executor import Executor
from parallax.server.http_server import launch_http_server, stop_http_server
from parallax.server.server_args import parse_args
from parallax_utils.ascii_anime import display_parallax_join
from parallax_utils.logging_config import get_logger, set_log_level
from parallax_utils.version_check import check_latest_release

logger = get_logger("parallax.launch")

Expand Down
2 changes: 1 addition & 1 deletion src/parallax/server/node_chat_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from starlette.datastructures import State

from backend.server.rpc_connection_handler import RPCConnectionHandler
from common.file_util import get_project_root
from parallax_utils.file_util import get_project_root
from parallax_utils.logging_config import get_logger

logger = get_logger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/parallax_utils/ascii_anime.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import math
import os

from common.file_util import get_project_root
from parallax_utils.file_util import get_project_root


class HexColorPrinter:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.