GlueModel from example returns map object instead of list
Hi,
as you can see on the 1st screenshot, GlueModel from lit_nlp.examples.models.glue_models returns map object,
instead of intended list. After executing
map_result = nn.predict_minibatch([{'sentence1': 'Hello there'}])
list_result = list(map_result),
the result looks more like it should (see 2nd screenshot). Is it the intended behaviour?

I'm not familiar with this debugger, but it looks like list_result in the second image is a single-element list, which should be correct.
Thanks for reaching out.
Looks like the glue models predict_minibatch code uses the python build-in function map to create the output dicts for each input. This function returns a map iterable which as you saw can be converted to an actual list by wrapping it in the list constructor.
So technically the glue models code doesn't conform to the API from api/models.py in that it returns an iterable instead of a list. But, given how LIT uses the results, the returned value is used as a list to send the results back to the front-end.
So I suppose I would say that the code in glue models would technically be more correct if it converted the map iterable result to a list before returning, but it doesn't cause any issues in how LIT functions.
Update to this before closing: The LIT v1.0 release updated the Model.predict type annotations to be an Iterable instead of a list.
Closing this issue due to inactivity.