From f0e415ef36670ccc9049c5ff581d4ac8ee073a74 Mon Sep 17 00:00:00 2001 From: Andrei Ivanov Date: Thu, 30 Jan 2025 20:27:42 -0800 Subject: [PATCH] Fixing lint problems --- examples/pytorch/metapath2vec/test.py | 12 ++++++------ examples/pytorch/node2vec/model.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/pytorch/metapath2vec/test.py b/examples/pytorch/metapath2vec/test.py index 6ec68f86c7f1..ca6ab0ae268f 100644 --- a/examples/pytorch/metapath2vec/test.py +++ b/examples/pytorch/metapath2vec/test.py @@ -94,13 +94,13 @@ author_true = np.array(author_true) file.close() print("beging predicting") - clf_venue = LogisticRegression( - random_state=0, solver="lbfgs", - ).fit(venue_training, venue_label) + clf_venue = LogisticRegression(random_state=0, solver="lbfgs").fit( + venue_training, venue_label + ) y_pred_venue = clf_venue.predict(venue_testing) - clf_author = LogisticRegression( - random_state=0, solver="lbfgs", - ).fit(author_training, author_label) + clf_author = LogisticRegression(random_state=0, solver="lbfgs").fit( + author_training, author_label + ) y_pred_author = clf_author.predict(author_testing) macro_average_venue += f1_score( venue_true, y_pred_venue, average="macro" diff --git a/examples/pytorch/node2vec/model.py b/examples/pytorch/node2vec/model.py index 2dce23225d3e..282799bbe1fb 100644 --- a/examples/pytorch/node2vec/model.py +++ b/examples/pytorch/node2vec/model.py @@ -190,9 +190,9 @@ def evaluate(self, x_train, y_train, x_val, y_val): x_train, y_train = x_train.cpu().numpy(), y_train.cpu().numpy() x_val, y_val = x_val.cpu().numpy(), y_val.cpu().numpy() - lr = LogisticRegression( - solver="lbfgs", max_iter=150 - ).fit(x_train, y_train) + lr = LogisticRegression(solver="lbfgs", max_iter=150).fit( + x_train, y_train + ) return lr.score(x_val, y_val)