Skip to content

Commit

Permalink
fix: correct error message (#193)
Browse files Browse the repository at this point in the history
* fix: correct error message

It was supposed to print the received array but it was not doing it.
Also, the type is now displayed.

* review: fix format with pyink
  • Loading branch information
tengomucho authored Dec 13, 2024
1 parent 26908e9 commit 3e46b8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions jetstream_pt/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
flags.DEFINE_bool("enable_model_warmup", False, "enable model warmup")



def shard_weights(env, weights, weight_shardings):
"""Shard weights according to weight_shardings"""
sharded = {}
Expand Down
2 changes: 1 addition & 1 deletion jetstream_pt/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def prefill(
else:
raise TypeError(
"Input tokens should be of type Jax Array, but receiving:"
" {prefill_inputs}"
f" {prefill_inputs} of type {type(prefill_inputs)}"
)
seq_len = padded_tokens.shape[0]
input_indexes = jnp.arange(0, seq_len)
Expand Down

0 comments on commit 3e46b8e

Please sign in to comment.