align tranform_shard api between spark and ray (#2343)
align tranform_shard api between spark and ray (#2343)

* align tranform_shard api

* fix tests
yangw1234/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL,intel-analytics/BigDL,intel-analytics/BigDL,yangw1234/BigDL