File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,7 @@ defmodule Bumblebee.Text do
381381
382382 * `:mean_pooling` - performs a mean across all tokens
383383
384- * `cls_token_pooling` - takes the embedding for the special CLS token.
384+ * `: cls_token_pooling` - takes the embedding for the special CLS token.
385385 Note that we currently assume that the CLS token is the first token
386386 in the sequence
387387
Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ defmodule Bumblebee.Text.TextEmbedding do
4242
4343 output =
4444 case output do
45+ % { ^ output_attribute => % Axon.None { } } ->
46+ keys = output |> Map . keys ( ) |> Enum . sort ( )
47+
48+ raise ArgumentError ,
49+ "key #{ inspect ( output_attribute ) } in the output map has value %Axon.None{}," <>
50+ " make sure this is the correct key and check module documentation incase it is opt-in." <>
51+ " The output map keys are: #{ inspect ( keys ) } "
52+
4553 % { ^ output_attribute => output } ->
4654 output
4755
You can’t perform that action at this time.
0 commit comments