Skip to content

Commit

Permalink
Revert wrong commits (#1621)
Browse files Browse the repository at this point in the history
Revert wrong commits.
  • Loading branch information
dashanji authored Nov 26, 2023
1 parent a76c685 commit c650cf0
Show file tree
Hide file tree
Showing 38 changed files with 89 additions and 606 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ env:
jobs:
ci:
runs-on: ${{ matrix.os }}
#if: ${{ github.repository == 'v6d-io/v6d' }}
if: ${{ github.repository == 'v6d-io/v6d' }}
strategy:
matrix:
os: [ubuntu-20.04]
Expand Down
2 changes: 1 addition & 1 deletion benchmark/alloc_test/bench_allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void bench() {
PRNG rng;

for (size_t k = 0; k < 32; ++k) {
for (size_t j = 0; j<iterCount>> 5; ++j) {
for (size_t j = 0; j < iterCount >> 5; ++j) {
uint32_t rnum1 = rng.rng32();
uint32_t rnum2 = rng.rng32();
size_t idx = Pareto_80_20_6_Rand(paretoData, rnum1, rnum2);
Expand Down
77 changes: 38 additions & 39 deletions modules/graph/fragment/arrow_fragment.vineyard-mod
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ class [[vineyard]] ArrowFragment
vid_parser_.GenerateId(0, label_id, tvnums_[label_id]));
}

vertex_range_t InnerVerticesSlice(label_id_t label_id, vid_t start, vid_t end)
const {
vertex_range_t InnerVerticesSlice(label_id_t label_id, vid_t start,
vid_t end) const {
CHECK(start <= end && start <= ivnums_[label_id]);
if (end <= ivnums_[label_id]) {
return vertex_range_t(vid_parser_.GenerateId(0, label_id, start),
Expand Down Expand Up @@ -537,13 +537,13 @@ class [[vineyard]] ArrowFragment
return oe_offsets_ptr_lists_[v_label][e_label];
}

inline int64_t GetIncomingOffsetLength(label_id_t v_label, label_id_t e_label)
const {
inline int64_t GetIncomingOffsetLength(label_id_t v_label,
label_id_t e_label) const {
return ie_offsets_lists_[v_label][e_label]->length();
}

inline int64_t GetOutgoingOffsetLength(label_id_t v_label, label_id_t e_label)
const {
inline int64_t GetOutgoingOffsetLength(label_id_t v_label,
label_id_t e_label) const {
return oe_offsets_lists_[v_label][e_label]->length();
}

Expand Down Expand Up @@ -586,23 +586,23 @@ class [[vineyard]] ArrowFragment
grape::PrepareConf conf);

boost::leaf::result<ObjectID> AddVerticesAndEdges(
Client & client,
std::map<label_id_t, std::shared_ptr<arrow::Table>> && vertex_tables_map,
std::map<label_id_t, std::shared_ptr<arrow::Table>> && edge_tables_map,
Client& client,
std::map<label_id_t, std::shared_ptr<arrow::Table>>&& vertex_tables_map,
std::map<label_id_t, std::shared_ptr<arrow::Table>>&& edge_tables_map,
ObjectID vm_id,
const std::vector<std::set<std::pair<std::string, std::string>>>&
edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddVertices(
Client & client,
std::map<label_id_t, std::shared_ptr<arrow::Table>> && vertex_tables_map,
Client& client,
std::map<label_id_t, std::shared_ptr<arrow::Table>>&& vertex_tables_map,
ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddEdges(
Client & client,
std::map<label_id_t, std::shared_ptr<arrow::Table>> && edge_tables_map,
Client& client,
std::map<label_id_t, std::shared_ptr<arrow::Table>>&& edge_tables_map,
const std::vector<std::set<std::pair<std::string, std::string>>>&
edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;
Expand All @@ -611,51 +611,50 @@ class [[vineyard]] ArrowFragment
/// Vertex label id started from vertex_label_num_, and edge label id
/// started from edge_label_num_.
boost::leaf::result<ObjectID> AddNewVertexEdgeLabels(
Client & client,
std::vector<std::shared_ptr<arrow::Table>> && vertex_tables,
std::vector<std::shared_ptr<arrow::Table>> && edge_tables, ObjectID vm_id,
Client& client,
std::vector<std::shared_ptr<arrow::Table>>&& vertex_tables,
std::vector<std::shared_ptr<arrow::Table>>&& edge_tables, ObjectID vm_id,
const std::vector<std::set<std::pair<std::string, std::string>>>&
edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;

/// Add a set of new vertex labels to graph. Vertex label id started from
/// vertex_label_num_.
boost::leaf::result<ObjectID> AddNewVertexLabels(
Client & client,
std::vector<std::shared_ptr<arrow::Table>> && vertex_tables,
Client& client,
std::vector<std::shared_ptr<arrow::Table>>&& vertex_tables,
ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddVerticesToExistedLabel(
Client & client, label_id_t label_id,
std::shared_ptr<arrow::Table> && vertex_table, ObjectID vm_id,
Client& client, label_id_t label_id,
std::shared_ptr<arrow::Table>&& vertex_table, ObjectID vm_id,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<ObjectID> AddEdgesToExistedLabel(
Client & client, label_id_t label_id,
std::shared_ptr<arrow::Table> && edge_table,
Client& client, label_id_t label_id,
std::shared_ptr<arrow::Table>&& edge_table,
const std::set<std::pair<std::string, std::string>>& edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;

/// Add a set of new edge labels to graph. Edge label id started from
/// edge_label_num_.
boost::leaf::result<ObjectID> AddNewEdgeLabels(
Client & client,
std::vector<std::shared_ptr<arrow::Table>> && edge_tables,
Client& client, std::vector<std::shared_ptr<arrow::Table>>&& edge_tables,
const std::vector<std::set<std::pair<std::string, std::string>>>&
edge_relations,
const int concurrency = std::thread::hardware_concurrency()) override;

boost::leaf::result<vineyard::ObjectID> AddVertexColumns(
vineyard::Client & client,
vineyard::Client& client,
const std::map<
label_id_t,
std::vector<std::pair<std::string, std::shared_ptr<arrow::Array>>>>
columns,
bool replace = false) override;

boost::leaf::result<vineyard::ObjectID> AddVertexColumns(
vineyard::Client & client,
vineyard::Client& client,
const std::map<label_id_t,
std::vector<std::pair<
std::string, std::shared_ptr<arrow::ChunkedArray>>>>
Expand All @@ -664,23 +663,23 @@ class [[vineyard]] ArrowFragment

template <typename ArrayType = arrow::Array>
boost::leaf::result<vineyard::ObjectID> AddVertexColumnsImpl(
vineyard::Client & client,
vineyard::Client& client,
const std::map<
label_id_t,
std::vector<std::pair<std::string, std::shared_ptr<ArrayType>>>>
columns,
bool replace = false);

boost::leaf::result<vineyard::ObjectID> AddEdgeColumns(
vineyard::Client & client,
vineyard::Client& client,
const std::map<
label_id_t,
std::vector<std::pair<std::string, std::shared_ptr<arrow::Array>>>>
columns,
bool replace = false) override;

boost::leaf::result<vineyard::ObjectID> AddEdgeColumns(
vineyard::Client & client,
vineyard::Client& client,
const std::map<label_id_t,
std::vector<std::pair<
std::string, std::shared_ptr<arrow::ChunkedArray>>>>
Expand All @@ -689,37 +688,37 @@ class [[vineyard]] ArrowFragment

template <typename ArrayType = arrow::Array>
boost::leaf::result<vineyard::ObjectID> AddEdgeColumnsImpl(
vineyard::Client & client,
vineyard::Client& client,
const std::map<
label_id_t,
std::vector<std::pair<std::string, std::shared_ptr<ArrayType>>>>
columns,
bool replace = false);

boost::leaf::result<vineyard::ObjectID> Project(
vineyard::Client & client,
vineyard::Client& client,
std::map<label_id_t, std::vector<prop_id_t>> vertices,
std::map<label_id_t, std::vector<prop_id_t>> edges);

boost::leaf::result<vineyard::ObjectID> TransformDirection(
vineyard::Client & client, int concurrency);
vineyard::Client& client, int concurrency);

boost::leaf::result<vineyard::ObjectID> ConsolidateVertexColumns(
vineyard::Client & client, const label_id_t vlabel,
vineyard::Client& client, const label_id_t vlabel,
std::vector<std::string> const& prop_names,
std::string const& consolidate_name);

boost::leaf::result<vineyard::ObjectID> ConsolidateVertexColumns(
vineyard::Client & client, const label_id_t vlabel,
vineyard::Client& client, const label_id_t vlabel,
std::vector<prop_id_t> const& props, std::string const& consolidate_name);

boost::leaf::result<vineyard::ObjectID> ConsolidateEdgeColumns(
vineyard::Client & client, const label_id_t elabel,
vineyard::Client& client, const label_id_t elabel,
std::vector<std::string> const& prop_names,
std::string const& consolidate_name);

boost::leaf::result<vineyard::ObjectID> ConsolidateEdgeColumns(
vineyard::Client & client, const label_id_t elabel,
vineyard::Client& client, const label_id_t elabel,
std::vector<prop_id_t> const& props, std::string const& consolidate_name);

private:
Expand All @@ -731,10 +730,10 @@ class [[vineyard]] ArrowFragment
std::vector<std::vector<std::vector<fid_t*>>>& fid_lists_offset);

void directedCSR2Undirected(
vineyard::Client & client,
std::vector<std::vector<std::shared_ptr<PodArrayBuilder<nbr_unit_t>>>> &
vineyard::Client& client,
std::vector<std::vector<std::shared_ptr<PodArrayBuilder<nbr_unit_t>>>>&
oe_lists,
std::vector<std::vector<std::shared_ptr<FixedInt64Builder>>> &
std::vector<std::vector<std::shared_ptr<FixedInt64Builder>>>&
oe_offsets_lists,
const int concurrency, bool& is_multigraph);

Expand Down
6 changes: 1 addition & 5 deletions python/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,7 @@ void bind_client(py::module& mod) {
.def_property_readonly("rpc_endpoint", &ClientBase::RPCEndpoint,
doc::ClientBase_rpc_endpoint)
.def_property_readonly("version", &ClientBase::Version,
doc::ClientBase_version)
.def_property_readonly("is_ipc", &ClientBase::IsIPC,
doc::ClientBase_is_ipc)
.def_property_readonly("is_rpc", &ClientBase::IsRPC,
doc::ClientBase_is_rpc);
doc::ClientBase_version);

// Client
py::class_<Client, std::shared_ptr<Client>, ClientBase>(mod, "IPCClient",
Expand Down
2 changes: 1 addition & 1 deletion python/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ void bind_blobs(py::module& mod) {
});

// RemoteBlob
py::class_<RemoteBlob, std::shared_ptr<RemoteBlob>, Object>(
py::class_<RemoteBlob, std::shared_ptr<RemoteBlob>>(
mod, "RemoteBlob", py::buffer_protocol(), doc::RemoteBlob)
.def_property_readonly(
"id", [](RemoteBlob* self) -> ObjectIDWrapper { return self->id(); },
Expand Down
8 changes: 0 additions & 8 deletions python/pybind11_docs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,6 @@ The version number string of connected vineyard server, in the format of semver:
:code:`MAJOR.MINOR.PATCH`.
)doc";

const char* ClientBase_is_ipc = R"doc(
Whether the client is connected to vineyard server via UNIX domain socket.
)doc";

const char* ClientBase_is_rpc = R"doc(
Whether the client is connected to vineyard server via RPC endpoint.
)doc";

const char* IPCClient = R"doc(
IPC client that connects to vineyard instance's UNIX domain socket.
)doc";
Expand Down
2 changes: 0 additions & 2 deletions python/pybind11_docs.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ extern const char* ClientBase_status;
extern const char* ClientBase_ipc_socket;
extern const char* ClientBase_rpc_endpoint;
extern const char* ClientBase_version;
extern const char* ClientBase_is_ipc;
extern const char* ClientBase_is_rpc;

extern const char* IPCClient;
extern const char* IPCClient_create_blob;
Expand Down
5 changes: 0 additions & 5 deletions python/vineyard/contrib/ml/tests/test_dali.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ def vineyard_for_dali():
yield


def test_dali_tensor_with_rpc_client(vineyard_rpc_client):
test_dali_tensor(vineyard_rpc_client)


@pytest.mark.parametrize("vineyard_client", ["vineyard_client", "vineyard_rpc_client"])
def test_dali_tensor(vineyard_client):
@dali.pipeline_def()
def pipe():
Expand Down
16 changes: 0 additions & 16 deletions python/vineyard/contrib/ml/tests/test_mxnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ def vineyard_for_mxnet():
yield


def test_mxnet_tensor_with_rpc_client(vineyard_rpc_client):
test_mxnet_tensor(vineyard_rpc_client)


def test_mxnet_tensor(vineyard_client):
data = [np.random.rand(2, 3) for i in range(10)]
label = [np.random.rand(2, 3) for i in range(10)]
Expand All @@ -49,10 +45,6 @@ def test_mxnet_tensor(vineyard_client):
assert dataset[1][0].shape == dtrain[1][0].shape


def test_mxnet_dataframe_with_rpc_client(vineyard_rpc_client):
test_mxnet_dataframe(vineyard_rpc_client)


def test_mxnet_dataframe(vineyard_client):
df = pd.DataFrame({'a': [1, 2, 3, 4], 'b': [5, 6, 7, 8], 'c': [1.0, 2.0, 3.0, 4.0]})
label = df['c'].values.astype(np.float32)
Expand All @@ -67,10 +59,6 @@ def test_mxnet_dataframe(vineyard_client):
assert dataset[1].shape == dtrain[1].shape


def test_mxnet_record_batch_with_rpc_client(vineyard_rpc_client):
test_mxnet_record_batch(vineyard_rpc_client)


def test_mxnet_record_batch(vineyard_client):
arrays = [
pa.array([1, 2, 3, 4]),
Expand All @@ -84,10 +72,6 @@ def test_mxnet_record_batch(vineyard_client):
assert len(dtrain[0][0]) == 2


def test_mxnet_table_with_rpc_client(vineyard_rpc_client):
test_mxnet_table(vineyard_rpc_client)


def test_mxnet_table(vineyard_client):
arrays = [pa.array([1, 2]), pa.array([0, 1]), pa.array([0.1, 0.2])]
batch = pa.RecordBatch.from_arrays(arrays, ['f0', 'f1', 'target'])
Expand Down
16 changes: 0 additions & 16 deletions python/vineyard/contrib/ml/tests/test_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ def vineyard_for_tensorflow():
yield


def test_tensorflow_tensor_with_rpc_client(vineyard_rpc_client):
test_tensorflow_tensor(vineyard_rpc_client)


def test_tensorflow_tensor(vineyard_client):
data = [np.random.rand(2, 3) for i in range(10)]
label = [np.random.rand(2, 3) for i in range(10)]
Expand All @@ -57,10 +53,6 @@ def test_tensorflow_tensor(vineyard_client):
assert len(dataset) == len(dtrain)


def test_tensorflow_dataframe_with_rpc_client(vineyard_rpc_client):
test_tensorflow_dataframe(vineyard_rpc_client)


def test_tensorflow_dataframe(vineyard_client):
df = pd.DataFrame(
{'a': [1, 2, 3, 4], 'b': [5, 6, 7, 8], 'target': [1.0, 2.0, 3.0, 4.0]}
Expand All @@ -77,10 +69,6 @@ def test_tensorflow_dataframe(vineyard_client):
assert data_ncols == dtrain_ncols


def test_tensorflow_record_batch_with_rpc_client(vineyard_rpc_client):
test_tensorflow_record_batch(vineyard_rpc_client)


def test_tensorflow_record_batch(vineyard_client):
arrays = [
pa.array([1, 2, 3, 4]),
Expand All @@ -96,10 +84,6 @@ def test_tensorflow_record_batch(vineyard_client):
assert len(dtrain) == 4


def test_tensorflow_table_with_rpc_client(vineyard_rpc_client):
test_tensorflow_table(vineyard_rpc_client)


def test_tensorflow_table(vineyard_client):
arrays = [pa.array([1, 2]), pa.array([0, 1]), pa.array([0.1, 0.2])]
batch = pa.RecordBatch.from_arrays(arrays, ['f0', 'f1', 'label'])
Expand Down
Loading

0 comments on commit c650cf0

Please sign in to comment.