Commit graph

45 commits

Author SHA1 Message Date
Jiajun Yao
d7dcb1f938
Replace boost::filesystem with std::filesystem (#27522)
This redos #27319

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-08-04 21:33:51 -07:00
SangBin Cho
afd6597056
Revert "Replace boost::filesystem with std::filesystem (#27338)" (#27483)
This reverts commit c50faa126c.
2022-08-04 02:18:59 -07:00
Jiajun Yao
c50faa126c
Replace boost::filesystem with std::filesystem (#27338)
Redo #27319

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-08-01 17:12:23 -07:00
Jiajun Yao
36d5e5f99d
Revert "Replace boost::filesystem with std::filesystem (#27319)" (#27337)
This reverts commit 8e5c51d7d7.
2022-08-01 13:46:45 -07:00
Jiajun Yao
8e5c51d7d7
Replace boost::filesystem with std::filesystem (#27319)
std::filesystem is shipped with c++17, there is no need to depend on boost for this.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-08-01 11:44:39 -07:00
Guyang Song
0b60d90283
[Hotfix] Fix the failure of C++ tests (#27249)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
2022-07-30 00:31:02 +08:00
Guyang Song
06b0e715c7
[runtime env] plugin refactor [7/n]: support runtime env in C++ API (#27010)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
2022-07-27 18:24:31 +08:00
Riatre
591cd22be7
Revert "Revert "Bump pytest from 5.4.3 to 7.0.1"" (#26525)
* Revert "Revert "Bump pytest from 5.4.3 to 7.0.1""

This reverts commit ab10890e90.

Signed-off-by: Riatre Foo <foo@riat.re>

* Fix missing test data files dependency in rllib/BUILD

See # 26334 and # 26517 for context.

Once this is in, it should be good to roll-forwrad again.

Signed-off-by: Riatre Foo <foo@riat.re>

* debug: run all tests

Signed-off-by: Riatre Foo <foo@riat.re>

* Revert "debug: run all tests"

This reverts commit 0c5e796b0eb437d64922f66749c61b0412486970.

Signed-off-by: Riatre Foo <foo@riat.re>

* fix new tests since last rebase

Signed-off-by: Riatre Foo <foo@riat.re>
2022-07-18 21:21:19 -07:00
Sven Mika
ab10890e90
Revert "Bump pytest from 5.4.3 to 7.0.1" (breaks lots of RLlib tests for unknown reasons) (#26517) 2022-07-13 11:19:30 -07:00
Riatre
2cdb76789e
Bump pytest from 5.4.3 to 7.0.1 (#26334)
See #23676 for context. This is another attempt at that as I figured out what's going wrong in `bazel test`. Supersedes #24828.

Now that there are Python 3.10 wheels for Ray 1.13 and this is no longer a blocker for supporting Python 3.10, I still want to make `bazel test //python/ray/tests/...` work for developing in a 3.10 env, and make it easier to add Python 3.10 tests to CI in future.

The change contains three commits with rather descriptive commit message, which I repeat here:

Pass deps to py_test in py_test_module_list

    Bazel macro py_test_module_list takes a `deps` argument, but completely
    ignores it instead of passes it to `native.py_test`. Fixing that as we
    are going to use deps of py_test_module_list in BUILD in later changes.

    cpp/BUILD.bazel depends on the broken behaviour: it deps-on a cc_library
    from a py_test, which isn't working, see upstream issue:
    https://github.com/bazelbuild/bazel/issues/701.
    This is fixed by simply removing the (non-working) deps.

Depend on conftest and data files in Python tests BUILD files

    Bazel requires that all the files used in a test run should be
    represented in the transitive dependencies specified for the test
    target. For py_test, it means srcs, deps and data.

    Bazel enforces this constraint by creating a "runfiles" directory,
    symbolic links files in the dependency closure and run the test in the
    "runfiles" directory, so that the test shouldn't see files not in the
    dependency graph.

    Unfortunately, the constraint does not apply for a large number of
    Python tests, due to pytest (>=3.9.0, <6.0) resolving these symbolic
    links during test collection and effectively "breaks out" of the
    runfiles tree.

    pytest >= 6.0 introduces a breaking change and removed the symbolic link
    resolving behaviour, see pytest pull request
    https://github.com/pytest-dev/pytest/pull/6523 for more context.

    Currently, we are underspecifying dependencies in a lot of BUILD files
    and thus blocking us from updating to newer pytest (for Python 3.10
    support). This change hopefully fixes all of them, and at least those in
    CI, by adding data or source dependencies (mostly for conftest.py-s)
    where needed.

Bump pytest version from 5.4.3 to 7.0.1

    We want at least pytest 6.2.5 for Python 3.10 support, but not past
    7.1.0 since it drops Python 3.6 support (which Ray still supports), thus
    the version constraint is set to <7.1.

    Updating pytest, combined with earlier BUILD fixes, changed the ground
    truth of a few error message based unit test, these tests are updated to
    reflect the change.

    There are also two small drive-by changes for making test_traceback and
    test_cli pass under Python 3.10. These are discovered while debugging CI
    failures (on earlier Python) with a Python 3.10 install locally.  Expect
    more such issues when adding Python 3.10 to CI.
2022-07-12 21:14:35 -07:00
Tao Wang
bb6c805bd7
[Java worker][Cpp worker]Support Java call Cpp Task (#26182) 2022-07-12 17:49:22 +08:00
Larry
009c65ecb8
fix cpp hide symbols cause ut failure and compile error on mac (#26438) 2022-07-12 11:00:17 +08:00
Larry
c8a90e00ac
Hide other symbols in libray_api.so only keep ray* (#26069) 2022-07-01 11:51:40 +08:00
Tao Wang
49cafc6323
[Cpp worker][Java worker]Support Java call Cpp Actor (#25933) 2022-06-29 14:33:32 +08:00
Guyang Song
a0fbd54753
[C++ worker] use dynamic library in C++ default_worker (#25720) 2022-06-22 15:11:15 +08:00
Guyang Song
974bbc0f43
[C++ worker] move xlang test to separate test file (#25756) 2022-06-17 11:05:24 +08:00
Tao Wang
593a522abd
[Cpp worker]Support cpp call java actor (#25581) 2022-06-14 14:17:14 +08:00
qicosmos
e4a9517739
[C++ Worker]Python call cpp worker (#22820) 2022-03-10 11:06:14 -08:00
qicosmos
b8fbec1212
[C++ Worker]fix cpp api test (#22232) 2022-02-10 16:06:38 +08:00
Guyang Song
8e1e783596
fix "team:xxx" tag of cpp tests #22163
Cpp worker tests should be part of ray core.
2022-02-07 11:33:55 -08:00
qicosmos
7172802d8c
[C++ Worker][xlang] Support calling python worker (#21390)
C++ API need to call python and java worker, this pr support call python worker. Call python worker is similar with call c++ worker, need to pass PyFunction, PyActorClass and PyActorMethod.

## call python normal task
```python
#test_cross_language_invocation.py
import ray

@ray.remote
def py_return_input(v):
    return v
```

c++ api call python function
```c++
  auto py_obj1 = ray::Task(ray::PyFunction</*ReturnType*/int>{/*module_name=*/"test_cross_language_invocation",
                                                     /*function_name=*/"py_return_input"})
                     .Remote(42);
  EXPECT_EQ(42, *py_obj1.Get());
```
The user need to fill python module name and function name, then pass arguments into the remote.
The user also need to assign the return type and arguments types of the python function, it used to do static safe checking and get result.

## call python actor task
```python
#test_cross_language_invocation.py
@ray.remote
class Counter(object):
    def __init__(self, value):
        self.value = int(value)

    def increase(self, delta):
        self.value += int(delta)
        return str(self.value)
```
c++ api call python actor function
```c++
  // Create  python actor
  auto py_actor_handle =
      ray::Actor(ray::PyActorClass{/*module_name=*/"test_cross_language_invocation",  /*class_name=*/"Counter"})
          .Remote(1);
  EXPECT_TRUE(!py_actor_handle.ID().empty());

  // Call python actor task
  auto py_actor_ret =
      py_actor_handle.Task(ray::PyActorMethod</*ReturnType*/std::string>{/*actor_function_name=*/"increase"}).Remote(1);
  EXPECT_EQ("2", *py_actor_ret.Get());
```
The user need to fill python module name and class name when creating python actor.

PyActorMethod only need to fill the function name.

It's also similar with calling c++ actor task, also has compile-time safe checking.
2022-01-21 13:55:30 +08:00
Guyang Song
c04fb62f1d
[C++ worker] set native library path for shared library search (#19376) 2021-10-18 16:03:49 +08:00
gjoliver
635010d460
Update build rules and patches for darwin_arm64 platform. (#19037)
* Update build rules and patches for darwin_arm64 platform.

Changes include:

Update nelhage/rules_boost package from current version (08/5/2020) to 5/27/2021 version.
Remove rules_boost-undefine-boost_fallthrough.patch, since BOOST_FALLTHROUGH seems to be defined now.
Minor changes to rules_boost-windows-linkopts.patch to use default condition to add -lpthread flag for all platforms.
Add darwin_arm64 config to BUILD files for lib civetweb pulled in via prometheu dependency.

* upgrade boost to 1.74.0 from 1.71.0 to match the udpated build file for windows.

* Fix ray_cpp_pkg

* Use boost/bind/bind.hpp

boost/bind.hpp and global namespace placeholders are deprecated.

* lint

* Use absl::bind_front when possible. Otherwise, NOLINT

* lint

* lint

* lint

* lint

* more lint

* final lint

* trigger build
2021-10-09 18:48:35 -07:00
Guyang Song
739cf64115
[C++ API] support head_args config in C++ API (#18709) 2021-09-23 19:30:53 +08:00
qicosmos
64c25987f3
[C++ Worker]Simple kv store example (#18613) 2021-09-18 16:02:44 +08:00
qicosmos
dd096c8e73
[C++ Worker]Fix abi issue (#18273) 2021-09-10 11:53:05 +08:00
Simon Mo
b573864928
[CI] Add test owners (#17893) 2021-08-18 18:38:31 -07:00
qicosmos
a2a1c46c83
[C++ Worker]Fix for mac (#17633)
* linkopts shared

* replace gflags with absl flags

* fix

* add test option

* fix

* add cpp worker to mac ci

* fix

* support empty redis password;mod arc argv

* add encoding

* test

* ignore example test on mac

* support mac

* fix

* fix and update doc

* fix

* fix run.sh

* fix init

* fix typo

* fix run.sh

* fix lint

Co-authored-by: 久龙 <guyang.sgy@antfin.com>
2021-08-13 12:22:37 +08:00
SongGuyang
dcb1baabd7
[C++ API] support loading C++ dynamic libraries from code search path (#16828) 2021-07-16 13:02:45 +08:00
SongGuyang
560fd15568
[C++ worker] support build and add C++ worker to python wheel (#16496) 2021-07-08 14:42:26 +08:00
Kai Yang
e925051ce4
[Core] Get node to connect for driver in global state accessor (#16810) 2021-07-08 11:21:12 +08:00
SongGuyang
41b9a5102b
[C++ worker] support build C++ worker during python setup (#16636) 2021-06-29 10:29:47 +08:00
qicosmos
4da69174c8
[C++ Worker]Remove unused boost sub libs for the generated template project (#16526) 2021-06-21 14:46:48 +08:00
qicosmos
0f87eca3e9
[C++ Worker]Generate a template project for users (#16337) 2021-06-16 17:45:45 +08:00
SongGuyang
17b5f4dcaa
[C++ worker] support config from RayConfig and command line(gflag) (#16086) 2021-05-31 11:56:02 +08:00
SongGuyang
a4c108e5f6
[C++ worker] delete unuseful test (#16082) 2021-05-27 11:23:59 +08:00
qicosmos
bbb61d0c00
[C++ Worker] remove core.h in api (#16079)
* remove core.h in api

* remove unused code and header

* remove core.h and some depencencies

* fix
2021-05-26 20:52:21 +08:00
qicosmos
d8f58e683f
[C++ worker] Add c++ worker log (#16015) 2021-05-26 16:13:02 +08:00
qicosmos
8790bb465b
[C++ worker] Remove func ptr offset (#15809) 2021-05-19 18:03:39 +08:00
qicosmos
de7ee75d27
[C++ worker] Ray normal task for RAY_REMOTE (#14599) 2021-03-27 09:56:40 +08:00
qicosmos
277b6f5d3c
Support arbitrary arguments for c++ worker normal tasks and actor tasks (#14233) 2021-03-01 16:27:03 +08:00
SongGuyang
361e5f0bef
support dynamic library loading in C++ worker (#13734) 2021-02-01 19:24:33 +08:00
SongGuyang
5cbc411e38
[cpp worker] support cluster mode (#9977) 2020-09-18 11:08:18 +08:00
SongGuyang
cb70864c04
[cpp worker] support cluster mode and object Put/Get works (#9682) 2020-08-28 13:53:36 +08:00
SongGuyang
c195dc8f88
Basic C++ worker implementation (#6125) 2020-03-27 23:01:08 +08:00