Skip to content

Commit

Permalink
Merge branch 'main' into ghs-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GhaziSyed authored Jul 12, 2024
2 parents bd4b28a + d0545a2 commit 6e28137
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ REQUESTS_FILENAME=sample_requests.json
# results file
RESULTS_FILENAME=results.json

# filename for combined results
RESULTS_ALL_FILENAME=results_all.json

# number of virtual users
NUM_USERS=1

Expand Down
2 changes: 1 addition & 1 deletion fmperf/WorkloadSpecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def __init__(

super().__init__(1, image, pvc_name, overwrite)


@classmethod
def from_yaml(cls, file: str):
return super().from_yaml(file)
Expand Down Expand Up @@ -103,6 +102,7 @@ def get_env(
]
return env


class HeterogeneousWorkloadSpec(WorkloadSpec):
def __init__(
self,
Expand Down
6 changes: 5 additions & 1 deletion fmperf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
from fmperf.ModelSpecs import TGISModelSpec, vLLMModelSpec
from fmperf.Cluster import Cluster, WorkloadSpec, DeployedModel
from fmperf.WorkloadSpecs import HeterogeneousWorkloadSpec, HomogeneousWorkloadSpec, RealisticWorkloadSpec
from fmperf.WorkloadSpecs import (
HeterogeneousWorkloadSpec,
HomogeneousWorkloadSpec,
RealisticWorkloadSpec,
)
5 changes: 5 additions & 0 deletions fmperf/loadgen/sweep.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
results.extend(tmp["results"])

parse_results(results, print_df=True)

outfile = f"/requests/{os.environ['RESULTS_ALL_FILENAME']}"
print(f">> writing all results to file: {outfile}")
with open(outfile, "w") as f:
json.dump(results, f)

0 comments on commit 6e28137

Please sign in to comment.