From f93fc98c265f27bf60bede9e1dfbf69490ce0dfc Mon Sep 17 00:00:00 2001 From: Bryan Perozzi Date: Wed, 17 Apr 2024 13:17:38 -0700 Subject: [PATCH] Fix typos. PiperOrigin-RevId: 625785056 --- tensorflow_gnn/sampler/sampling_spec_builder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tensorflow_gnn/sampler/sampling_spec_builder.py b/tensorflow_gnn/sampler/sampling_spec_builder.py index c5fec85f..4aae1443 100644 --- a/tensorflow_gnn/sampler/sampling_spec_builder.py +++ b/tensorflow_gnn/sampler/sampling_spec_builder.py @@ -58,7 +58,7 @@ ```python proto = (SamplingSpecBuilder(schema) - .seed('author').sample('writes', 10).sample('cited_by', 5) + .seed('author').sample('writes', 10).sample(5, 'cited_by') .build()) ``` @@ -73,15 +73,15 @@ ```python # Store builder at level of "author written papers": -builder = tfgnn.SamplingSpecBuilder(schema).seed('author').sample('writes', 10) -path1 = builder.sample('cited_by', 5) -path2 = builder.sample('written_by', 3).sample('writes') +builder = tfgnn.SamplingSpecBuilder(schema).seed('author').sample(10, 'writes') +path1 = builder.sample(5, 'cited_by') +path2 = builder.sample(3, 'written_by').sample('writes') -proto = (tfgnn.SamplingSpecBuilder.Join([path1, path2]).sample('cited_by', 10) +proto = (tfgnn.SamplingSpecBuilder.join([path1, path2]).sample(10, 'cited_by') .build()) # The above `Join()` can be made less verbose with: -proto = path1.Join([path2]).sample('cited_by', 10).build() +proto = path1.Join([path2]).sample(10, 'cited_by').build() ``` This merges together the papers written by author, and written by co-authors,