Factor_cmap - are only string factors supported?

I am trying to create a multi_line plot where the colors change based on a value of an id column in my data source.

My data source looked like:

ColumnDataSource(      {`
       "xs":  # list of list of x's
       "ys": # list of list of y's
       "group_id": # list of ints - one int per line 

And I called factor_cmap with


This failed until I changed group_ids to group_ids = [str(x) for x in ids]

Yes, categorical factors are always (only) strings, in general.