Skip to content

Commit 9c3e417

Browse files
author
Dylan Huang
committed
Refactor evaluator function calls to use Fireworks directly for method signature introspection, avoiding unnecessary API requests during help invocations.
1 parent f103b69 commit 9c3e417

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

eval_protocol/cli.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import sys
99
from pathlib import Path
1010

11+
from fireworks import Fireworks
12+
1113
from .cli_commands.common import setup_logging
1214
from .cli_commands.utils import add_args_from_callable_signature
13-
from .fireworks_client import create_fireworks_client
1415

1516
logger = logging.getLogger(__name__)
1617

@@ -82,7 +83,11 @@ def _configure_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParse
8283
)
8384

8485
# Auto-generate flags from SDK Fireworks().evaluators.create() signature
85-
create_evaluator_fn = create_fireworks_client().evaluators.create
86+
# Note: We use Fireworks() directly here instead of create_fireworks_client()
87+
# because we only need the method signature for introspection, not a fully
88+
# authenticated client. create_fireworks_client() would trigger an HTTP request
89+
# to verify the API key, causing delays even for --help invocations.
90+
create_evaluator_fn = Fireworks().evaluators.create
8691

8792
upload_skip_fields = {
8893
"__top_level__": {
@@ -191,7 +196,11 @@ def _configure_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParse
191196
"loss_config.method": "RL loss method for underlying trainers. One of {grpo,dapo}.",
192197
}
193198

194-
create_rft_job_fn = create_fireworks_client().reinforcement_fine_tuning_jobs.create
199+
# Note: We use Fireworks() directly here instead of create_fireworks_client()
200+
# because we only need the method signature for introspection, not a fully
201+
# authenticated client. create_fireworks_client() would trigger an HTTP request
202+
# to verify the API key, causing delays even for --help invocations.
203+
create_rft_job_fn = Fireworks().reinforcement_fine_tuning_jobs.create
195204

196205
add_args_from_callable_signature(
197206
rft_parser,

0 commit comments

Comments
 (0)