mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 12:55:34 +08:00
fc6259a656
* Cross language serialization for Java and Python * Use strict types when Python serializing * Handle recursive objects in Python; Pin msgpack >= 0.6.0, < 1.0.0 * Disable gc for optimizing msgpack loads * Fix merge bug * Java call Python use returnType; Fix ClassLoaderTest * Fix RayMethodsTest * Fix checkstyle * Fix lint * prepare_args raises exception if try to transfer a non-deserializable object to another language * Fix CrossLanguageInvocationTest.java, Python msgpack treat float as double * Minor fixes * Fix compile error on linux * Fix lint in java/BUILD.bazel * Fix test_failure * Fix lint * Class<?> to Class<T>; Refine metadata bytes. * Rename FST to Fst; sort java dependencies * Change Class<?>[] to Optional<Class<?>>; sort requirements in setup.py * Improve CrossLanguageInvocationTest * Refactor MessagePackSerializer.java * Refactor MessagePackSerializer.java; Refine CrossLanguageInvocationTest.java * Remove unnecessary dependencies for Java; Add getReturnType() for RayFunction in Java * Fix bug * Remove custom cross language type support * Replace Serializer.Meta with MutableBoolean * Remove @SuppressWarnings support from checkstyle.xml; Add null test in CrossLanguageInvocationTest.java * Refine MessagePackSerializer.pack * Ray.get support RayObject as input * Improve comments and error info * Remove classLoader argument from serializer * Separate msgpack from pickle5 in Python * Pair<byte[], MutableBoolean> to Pair<byte[], Boolean> * Remove public static <T> T get(RayObject<T> object), use RayObject.get() instead * Refine test * small fixes Co-authored-by: 刘宝 <po.lb@antfin.com> Co-authored-by: Hao Chen <chenh1024@gmail.com>
26 lines
671 B
Python
26 lines
671 B
Python
import pytest
|
|
|
|
import ray
|
|
import ray.cluster_utils
|
|
import ray.test_utils
|
|
|
|
|
|
def test_cross_language_raise_kwargs(shutdown_only):
|
|
ray.init(load_code_from_local=True, include_java=True)
|
|
|
|
with pytest.raises(Exception, match="kwargs"):
|
|
ray.java_function("a", "b").remote(x="arg1")
|
|
|
|
with pytest.raises(Exception, match="kwargs"):
|
|
ray.java_actor_class("a").remote(x="arg1")
|
|
|
|
|
|
def test_cross_language_raise_exception(shutdown_only):
|
|
ray.init(load_code_from_local=True, include_java=True)
|
|
|
|
class PythonObject(object):
|
|
pass
|
|
|
|
with pytest.raises(Exception, match="transfer"):
|
|
ray.java_function("a", "b").remote(PythonObject())
|