Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Add option to specify wandb entity #12

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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 etalon/metrics/metric_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(
target_deadline_miss_rate: float = 0.1,
should_write_metrics: bool = True,
wandb_project: str = None,
wandb_entity: str = None,
wandb_group: str = None,
wandb_run_name: str = None,
) -> None:
Expand All @@ -54,6 +55,7 @@ def __init__(
self.service_level_total_deadlines = 0
self.should_write_metrics = should_write_metrics
self.wandb_project = wandb_project
self.wandb_entity = wandb_entity
self.wandb_group = wandb_group
self.wandb_run_name = wandb_run_name

Expand Down Expand Up @@ -104,6 +106,7 @@ def _init_wandb(self):

wandb.init(
project=self.wandb_project,
entity=self.wandb_entity,
group=self.wandb_group,
name=self.wandb_run_name,
config={
Expand Down
2 changes: 2 additions & 0 deletions etalon/metrics/service_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def __init__(
target_deadline_miss_rate: float = 0.1,
should_write_metrics: bool = True,
wandb_project: str = None,
wandb_entity: str = None,
wandb_group: str = None,
wandb_run_name: str = None,
) -> None:
Expand All @@ -31,6 +32,7 @@ def __init__(
target_deadline_miss_rate=target_deadline_miss_rate,
should_write_metrics=should_write_metrics,
wandb_project=wandb_project,
wandb_entity=wandb_entity,
wandb_group=wandb_group,
wandb_run_name=wandb_run_name,
)
Expand Down
1 change: 1 addition & 0 deletions etalon/prefill_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def run(self):
request_generator_config=request_generator_config,
should_write_metrics=False,
wandb_project=self.args.wandb_project,
wandb_entity=self.args.wandb_entity,
wandb_group=self.args.wandb_group,
wandb_run_name=f"prefill_p{prefill_value}_{self.args.model}",
)
Expand Down
17 changes: 15 additions & 2 deletions etalon/run_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def run_benchmark(
target_deadline_miss_rate: float = 0.1,
should_write_metrics: bool = True,
wandb_project: str = None,
wandb_entity: str = None,
wandb_group: str = None,
wandb_run_name: str = None,
address_append_value: Optional[str] = "chat/completions",
Expand Down Expand Up @@ -237,6 +238,7 @@ def run_benchmark(
target_deadline_miss_rate=target_deadline_miss_rate,
should_write_metrics=should_write_metrics,
wandb_project=wandb_project,
wandb_entity=wandb_entity,
wandb_group=wandb_group,
wandb_run_name=wandb_run_name,
)
Expand Down Expand Up @@ -558,6 +560,12 @@ def parse_args():
default=None,
help=("The wandb project name. (default: %(default)s)"),
)
args.add_argument(
"--wandb-entity",
type=str,
default=None,
help=("The wandb entity name. (default: %(default)s)"),
)
args.add_argument(
"--wandb-group",
type=str,
Expand Down Expand Up @@ -629,10 +637,10 @@ def parse_args():
return args


if __name__ == "__main__":
def entrypoint():
random.seed(11111)

ray.init(runtime_env={"env_vars": dict(os.environ)})
ray.init(runtime_env={"env_vars": dict(os.environ)}, ignore_reinit_error=True)

args = parse_args()

Expand All @@ -654,8 +662,13 @@ def parse_args():
target_deadline_miss_rate=args.target_deadline_miss_rate,
should_write_metrics=args.should_write_metrics,
wandb_project=args.wandb_project,
wandb_entity=args.wandb_entity,
wandb_group=args.wandb_group,
wandb_run_name=args.wandb_run_name,
address_append_value=args.address_append_value,
request_every_minute=args.request_every_minute,
)


if __name__ == "__main__":
entrypoint()
Loading