This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-ai.git
The following commit(s) were added to refs/heads/main by this push:
new 220ceb18 chore: add GitHub Actions for auto upstream sync and update
SEALData subsample logic (#289)
220ceb18 is described below
commit 220ceb18be0665643c5423ec9c269b273c41bd53
Author: Linyu <[email protected]>
AuthorDate: Thu Jul 24 21:43:20 2025 +0800
chore: add GitHub Actions for auto upstream sync and update SEALData
subsample logic (#289)
This PR includes the following changes:
1. chore(workflow):
- Add .github/pull.yml to configure pull request rules for automatic
syncing with the upstream apache/main branch, including assignees and
reviewers.
- Add .github/workflows/sync.yml to enable scheduled (every 3 hours) and
manual synchronization of the fork with the upstream repository using
the Fork-Sync-With-Upstream-action. Includes error handling for workflow
suspension.
2. chore(seal):
- Update the SEALData.__call__ method in hugegraph_ml/models/seal.py to
remove the assignment of subsample_ratio for both "train" and other
split types, replacing it with pass statements.
- Update the file path string formatting for saving subsampled data.
These changes help automate repository maintenance and clarify the
SEALData subsampling logic. No functional changes to model behavior are
introduced.
---
.github/pull.yml | 11 ++++++++
.github/workflows/sync.yml | 39 ++++++++++++++++++++++++++++
hugegraph-ml/src/hugegraph_ml/models/seal.py | 3 ++-
3 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/.github/pull.yml b/.github/pull.yml
new file mode 100644
index 00000000..c29185c6
--- /dev/null
+++ b/.github/pull.yml
@@ -0,0 +1,11 @@
+version: "1"
+rules:
+ - base: main
+ upstream: apache/main
+ mergeMethod: rebase
+ assignees:
+ - imbajin
+ reviewers:
+ - imbajin
+ conflictReviewers:
+ - imbajin
diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml
new file mode 100644
index 00000000..51e9ac45
--- /dev/null
+++ b/.github/workflows/sync.yml
@@ -0,0 +1,39 @@
+name: Upstream Sync
+
+permissions:
+ contents: write
+
+on:
+ schedule:
+ - cron: "0 */3 * * *" # every 3 hours
+ workflow_dispatch:
+
+jobs:
+ sync_latest_from_upstream:
+ name: Sync latest commits from upstream repo
+ runs-on: ubuntu-latest
+ if: ${{ github.event.repository.fork }}
+
+ steps:
+ # Step 1: run a standard checkout action
+ - name: Checkout target repo
+ uses: actions/checkout@v4
+
+ # Step 2: run the sync action
+ - name: Sync upstream changes
+ id: sync
+ uses: aormsby/[email protected]
+ with:
+ upstream_sync_repo: apache/incubator-hugegraph-ai
+ upstream_sync_branch: main
+ target_sync_branch: main
+ target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically
generated, no need to set
+
+ # Set test_mode true to run tests instead of the true action!!
+ test_mode: false
+
+ - name: Sync check
+ if: failure()
+ run: |
+ echo "[Error] Due to a change in the workflow file of the upstream
repository, GitHub has automatically suspended the scheduled automatic update.
You need to manually sync your fork. Please refer to the detailed tutorial for
instructions:
https://github.com/Yidadaa/ChatGPT-Next-Web#enable-automatic-updates"
+ exit 1
diff --git a/hugegraph-ml/src/hugegraph_ml/models/seal.py
b/hugegraph-ml/src/hugegraph_ml/models/seal.py
index 59f749da..f743857b 100644
--- a/hugegraph-ml/src/hugegraph_ml/models/seal.py
+++ b/hugegraph-ml/src/hugegraph_ml/models/seal.py
@@ -49,6 +49,7 @@ from ogb.linkproppred import DglLinkPropPredDataset, Evaluator
from scipy.sparse.csgraph import shortest_path
from tqdm import tqdm
+
class GCN(nn.Module):
"""
GCN Model
@@ -704,7 +705,7 @@ class SEALData(object):
path = osp.join(
self.save_dir or "",
-
"f{self.prefix}_{split_type}_{self.hop}-hop_{subsample_ratio}-subsample.bin"
+
f"{self.prefix}_{split_type}_{self.hop}-hop_{subsample_ratio}-subsample.bin",
)
if osp.exists(path):