Skip to content

Commit 93af3b3

Browse files
committed
[*] Typo fixes
1 parent 261f250 commit 93af3b3

23 files changed

Lines changed: 54 additions & 54 deletions

benchmarks/mlperf/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ def flush_queries(self):
327327
self.accuracy_log.write(json.dumps(pred_outputs))
328328
self.accuracy_log.flush()
329329
self.accuracy_log.close()
330-
log.info("Dumpped prediction outputs to accuracy log... ")
330+
log.info("Dumped prediction outputs to accuracy log... ")
331331

332332
def __del__(self):
333333
print("Finished destroying SUT.")

benchmarks/tests/test_benchmark_serving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def test_benchmark(self):
4444
disable_tqdm = True
4545

4646
async def mocked_decode_response():
47-
"""Mocks decode reponse as an async generator."""
47+
"""Mocks decode response as an async generator."""
4848
responses = [
4949
jetstream_pb2.DecodeResponse(
5050
stream_content=jetstream_pb2.DecodeResponse.StreamContent(

docs/observability-prometheus-metrics-in-jetstream-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Observability in JetStream Server
22

3-
In JetStream Server, we use [Prometheus](https://prometheus.io/docs/introduction/overview/) to collect key metrics within JetStream orchestrator and engines. We implemented a [Prometheus client server](https://prometheus.github.io/client_python/exporting/http/) in JetStream `server_lib.py` and use `MetricsServerConfig` (by passing `prometheus_port` in server entrypoint) to gaurd the metrics observability feature.
3+
In JetStream Server, we use [Prometheus](https://prometheus.io/docs/introduction/overview/) to collect key metrics within JetStream orchestrator and engines. We implemented a [Prometheus client server](https://prometheus.github.io/client_python/exporting/http/) in JetStream `server_lib.py` and use `MetricsServerConfig` (by passing `prometheus_port` in server entrypoint) to guard the metrics observability feature.
44

55
## Enable Prometheus server to observe Jetstream metrics
66

experimental/jax/inference/entrypoint/mini_offline_benchmarking.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ def benchmark():
6464
num_input_tokens = sum(map(lambda r: len(r.input_tokens), res_list))
6565
num_output_tokens = sum(map(lambda r: len(r.generated_tokens), res_list))
6666

67-
print("Benchmarking result: ")
68-
print(" Total requests:", len(dataset))
69-
print(" Total input tokens:", num_input_tokens)
70-
print(" Total output tokens:", num_output_tokens)
71-
print(f" Input token thruput: {num_input_tokens/duration: .2f} tokens/sec")
72-
print(f" Output token thruput: {num_output_tokens/duration: .2f} tokens/sec")
67+
print("Benchmarking result:")
68+
print(" Total requests: ", len(dataset))
69+
print(" Total input tokens: ", num_input_tokens)
70+
print(" Total output tokens: ", num_output_tokens)
71+
print(f" Input token throughput: {num_input_tokens/duration: .2f} tokens/sec")
72+
print(f" Output token throughput: {num_output_tokens/duration: .2f} tokens/sec")
7373

7474

7575
if __name__ == "__main__":

experimental/jax/inference/nn/linear.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
https://www.apache.org/licenses/LICENSE-2.0
99
10-
Unless reuired by applicable law or agreed to in writing, software
10+
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
1212
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
See the License for the specific language governing permissions and

experimental/jax/inference/parallel/operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
def reduce_scatter(operand, scatter_dimension, axis_names):
25-
"""reduce-scatter sum operation via ppermute."""
25+
"""reduce-scatter sum operation via permute."""
2626
idx = get_partition_index(axis_names=axis_names)
2727
num_partitions = get_num_partitions(axis_names=axis_names)
2828
chunk_size = operand.shape[scatter_dimension] // num_partitions

experimental/jax/inference/parallel/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ def pspec(a):
2727
elif isinstance(a, int) or isinstance(a, float):
2828
return P()
2929
else:
30-
raise ValueError(f"unknown parition spec for {a}")
30+
raise ValueError(f"unknown partition spec for {a}")
3131

3232
return jax.tree_util.tree_map(pspec, sharded_pytree)

experimental/jax/inference/runtime/batch_scheduler.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,20 @@ def schedule(
110110
cur_prompt_chunk_len = (
111111
total_len - next_prefill_req.chunk_idx * next_prefill_req.chunk_size
112112
)
113-
alloced_pages = self.kv_manager.alloc_prefill_hbm_pages(
113+
allocated_pages = self.kv_manager.alloc_prefill_hbm_pages(
114114
cur_prompt_chunk_len
115115
)
116-
if len(alloced_pages) == 0:
116+
if len(allocated_pages) == 0:
117117
# TODO: introduce priority for the request and better
118118
# eviction algorithm.
119119
raise NotImplementedError("Eviction is not supported yet")
120120
else:
121121
start_idx = (
122122
next_prefill_req.chunk_idx * next_prefill_req.chunk_size
123123
) // self.kv_manager.page_size
124-
for i, page in enumerate(alloced_pages):
124+
for i, page in enumerate(allocated_pages):
125125
next_prefill_req.page_indices[start_idx + i] = page
126-
prefill_pages_update = PrefillPagesUpdate(alloced_pages)
126+
prefill_pages_update = PrefillPagesUpdate(allocated_pages)
127127

128128
# Schedule new generate reqs and allocate memory for all reqs.
129129
with generate_state.map_mutex:
@@ -150,12 +150,12 @@ def schedule(
150150
next_generate_reqs.append(gr)
151151

152152
# Check and alloc memory for generate.
153-
alloced_pages = self.kv_manager.alloc_hbm_pages(
153+
allocated_pages = self.kv_manager.alloc_hbm_pages(
154154
len(generate_state.active_slot_req_map)
155155
)
156156
if (
157157
len(generate_state.active_slot_req_map) != 0
158-
and len(alloced_pages) == 0
158+
and len(allocated_pages) == 0
159159
):
160160
raise NotImplementedError(
161161
"Eviction isn't supported yet, please set a lower value for batch_size"
@@ -169,17 +169,17 @@ def schedule(
169169
if idx >= len(req.page_indices):
170170
continue
171171

172-
req.page_indices[idx] = alloced_pages[page_to_use]
172+
req.page_indices[idx] = allocated_pages[page_to_use]
173173
generate_state_page_updates.append(
174174
GenerateStatePageUpdate(
175175
slot=slot,
176176
page_idx=idx,
177-
mapped_idx=alloced_pages[page_to_use],
177+
mapped_idx=allocated_pages[page_to_use],
178178
)
179179
)
180180
page_to_use += 1
181181

182-
self.kv_manager.free_hbm_pages(alloced_pages[page_to_use:])
182+
self.kv_manager.free_hbm_pages(allocated_pages[page_to_use:])
183183

184184
if len(generate_state.active_slot_req_map) == 0:
185185
schedule_generate = False

experimental/jax/inference/runtime/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def __init__(
223223
)
224224
print(" preprocess,", end="")
225225
self._preprocess_queue: queue.Queue[Request] = queue.Queue()
226-
# TODO: Seperate the running loop with the static inference model.
226+
# TODO: Separate the running loop with the static inference model.
227227
self._preprocess_thread = threading.Thread(
228228
name="preprocess", target=self._preprocess
229229
)

experimental/jetstream-maxtext-stable-stack/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ docker build --no-cache \
3737
-t ${LOCAL_IMAGE_TAG} \
3838
-f ./Dockerfile .
3939

40-
echo "********* Sucessfully built Stable Stack Image with tag $LOCAL_IMAGE_TAG *********"
40+
echo "********* Successfully built Stable Stack Image with tag $LOCAL_IMAGE_TAG *********"

0 commit comments

Comments
 (0)