-
Notifications
You must be signed in to change notification settings - Fork 267
chore: fix docs build #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SemyonSinchenko
merged 4 commits into
graphframes:main
from
SemyonSinchenko:fix-docs-build
Apr 1, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a288445
chore: bump versions for publishing to latest
SemyonSinchenko 9de8714
fix: fix docs build
SemyonSinchenko d7a9cb8
Merge remote-tracking branch 'graphframes/main' into fix-docs-build
SemyonSinchenko cea5e5f
fix: copilot comments
SemyonSinchenko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| #!/usr/bin/env python3 | ||
|
|
||
| import argparse | ||
| import json | ||
| import subprocess | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| def run_sbt(sbt_cmd: str, spark_version: str, jmh_args: str, repo_root: Path) -> None: | ||
| subprocess.run( | ||
| [sbt_cmd, f"-Dspark.version={spark_version}", jmh_args], | ||
| check=True, | ||
| cwd=repo_root, | ||
| ) | ||
|
|
||
|
|
||
| def load_json_array(path: Path) -> list[dict]: | ||
| with path.open("r", encoding="utf-8") as file: | ||
| data = json.load(file) | ||
| if not isinstance(data, list): | ||
| raise ValueError(f"Expected a JSON array in {path}") | ||
| return data | ||
|
|
||
|
|
||
| def main() -> None: | ||
| repo_root = Path(__file__).resolve().parent.parent | ||
| parser = argparse.ArgumentParser(description="Run benchmarks needed for docs generation") | ||
| parser.add_argument("--spark-version", default="4.0.0") | ||
| parser.add_argument("--sbt", default=str((repo_root / "build" / "sbt").resolve())) | ||
| args = parser.parse_args() | ||
|
|
||
| results_dir = (repo_root / "benchmarks" / "target" / "doc-jmh").resolve() | ||
| results_dir.mkdir(parents=True, exist_ok=True) | ||
|
|
||
| benchmark_commands = [ | ||
| ( | ||
| results_dir / "shortest-paths.json", | ||
| "benchmarks/Jmh/run -rf json -p graphName=wiki-Talk -p useLocalCheckpoints=true " | ||
| "-p algorithm=graphframes,graphx " | ||
| "org.graphframes.benchmarks.ShortestPathsBenchmark", | ||
| ), | ||
| ( | ||
| results_dir / "connected-components.json", | ||
| "benchmarks/Jmh/run -rf json -p graphName=wiki-Talk -p useLocalCheckpoints=true " | ||
| "-p algorithm=graphframes,graphx -p broadcastThreshold=-1 " | ||
| "org.graphframes.benchmarks.ConnectedComponentsBenchmark", | ||
| ), | ||
| ( | ||
| results_dir / "label-propagation.json", | ||
| "benchmarks/Jmh/run -rf json -p graphName=wiki-Talk -p useLocalCheckpoints=true " | ||
| "-p algorithm=graphframes,graphx " | ||
| "org.graphframes.benchmarks.LabelPropagationBenchmark", | ||
| ), | ||
| ] | ||
|
|
||
| all_results: list[dict] = [] | ||
| for output_file, cmd in benchmark_commands: | ||
| run_sbt(args.sbt, args.spark_version, f"{cmd} -rff {output_file}", repo_root) | ||
| all_results.extend(load_json_array(output_file)) | ||
|
|
||
| target_file = (repo_root / "benchmarks" / "jmh-result.json").resolve() | ||
| with target_file.open("w", encoding="utf-8") as file: | ||
| json.dump(all_results, file, indent=2) | ||
| file.write("\n") | ||
|
|
||
| print(f"Saved {len(all_results)} benchmark entries to {target_file}") | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.