Skip to content

Commit 45a6d56

Browse files
committed
Implement KNN
1 parent 8eb0ec7 commit 45a6d56

File tree

14 files changed

+1369
-2
lines changed

14 files changed

+1369
-2
lines changed

graphdatascience/arrow_client/v2/mutation_client.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,20 @@ def mutate_node_property(client: AuthenticatedArrowClient, job_id: str, mutate_p
1616
mutate_arrow_res = client.do_action_with_retry(MutationClient.MUTATE_ENDPOINT, mutate_config)
1717
mutate_millis = math.ceil((time.time() - start_time) * 1000)
1818
return MutateResult(mutateMillis=mutate_millis, **deserialize_single(mutate_arrow_res))
19+
20+
@staticmethod
21+
def mutate_relationship_property(
22+
client: AuthenticatedArrowClient,
23+
job_id: str,
24+
mutate_relationship_type: str,
25+
mutate_property: str,
26+
) -> MutateResult:
27+
mutate_config = {
28+
"jobId": job_id,
29+
"mutateProperty": mutate_property,
30+
"mutateRelationshipType": mutate_relationship_type,
31+
}
32+
start_time = time.time()
33+
mutate_arrow_res = client.do_action_with_retry(MutationClient.MUTATE_ENDPOINT, mutate_config)
34+
mutate_millis = math.ceil((time.time() - start_time) * 1000)
35+
return MutateResult(mutateMillis=mutate_millis, **deserialize_single(mutate_arrow_res))

graphdatascience/procedure_surface/api/similarity/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)