-
Notifications
You must be signed in to change notification settings - Fork 2
Update deployment branch #57
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
Changes from all commits
24eb234
5fc8c83
e341440
30009a4
d834f29
8537a60
12ca169
fcb959c
7f6cd0b
ecd1d8f
8e7d478
6307356
b941284
22b18db
d345da9
b74f16e
ec26436
1233e66
7cb00e6
b17d1a8
f58f1d7
fd11de6
d08f3b0
9665aaf
f6ce214
2908718
b8968c0
720f77a
e7f1f85
ab8351b
c4844d3
545283a
7328ff8
09c8711
6dc44fa
181fc30
067bc1d
37dd46e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Claude Code Review | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| claude-review: | ||
| # Optional: Filter by PR author | ||
| # if: | | ||
| # github.event.pull_request.user.login == 'external-contributor' || | ||
| # github.event.pull_request.user.login == 'new-developer' || | ||
| # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code Review | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' | ||
| plugins: 'code-review@claude-code-plugins' | ||
| prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}' | ||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Claude Code | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| issues: | ||
| types: [opened, assigned] | ||
| pull_request_review: | ||
| types: [submitted] | ||
|
|
||
| jobs: | ||
| claude: | ||
| if: | | ||
| (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || | ||
| (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || | ||
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write | ||
| actions: read # Required for Claude to read CI results on PRs | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code | ||
| id: claude | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
|
|
||
| # This is an optional setting that allows Claude to read CI results on PRs | ||
| additional_permissions: | | ||
| actions: read | ||
|
|
||
| # Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it. | ||
| # prompt: 'Update the pull request description to include a summary of changes.' | ||
|
|
||
| # Optional: Add claude_args to customize behavior and configuration | ||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://code.claude.com/docs/en/cli-reference for available options | ||
| # claude_args: '--allowed-tools Bash(gh pr:*)' | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -44,6 +44,16 @@ def topological_sort(nodes: List[Dict], edges: List[Dict]) -> List[Dict]: | |||||||||||||||||||||
| if in_degree[neighbor] == 0: | ||||||||||||||||||||||
| queue.append(neighbor) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # Cycle detection: if not all nodes were sorted, there's a cycle | ||||||||||||||||||||||
| if len(sorted_ids) != len(nodes): | ||||||||||||||||||||||
| # Find nodes that are still in the cycle (have non-zero in-degree) | ||||||||||||||||||||||
| cycle_nodes = [node_id for node_id, degree in in_degree.items() if degree > 0] | ||||||||||||||||||||||
| raise ValueError( | ||||||||||||||||||||||
| f"Graph contains a cycle. Neural networks must be acyclic (feedforward). " | ||||||||||||||||||||||
| f"Nodes involved in cycle: {', '.join(cycle_nodes[:5])}" | ||||||||||||||||||||||
|
Comment on lines
+49
to
+53
|
||||||||||||||||||||||
| # Find nodes that are still in the cycle (have non-zero in-degree) | |
| cycle_nodes = [node_id for node_id, degree in in_degree.items() if degree > 0] | |
| raise ValueError( | |
| f"Graph contains a cycle. Neural networks must be acyclic (feedforward). " | |
| f"Nodes involved in cycle: {', '.join(cycle_nodes[:5])}" | |
| # Find nodes that could not be topologically sorted (cycle candidates, may include downstream nodes) | |
| cycle_nodes = [node_id for node_id, degree in in_degree.items() if degree > 0] | |
| raise ValueError( | |
| f"Graph contains a cycle or unsortable component. Neural networks must be acyclic (feedforward). " | |
| f"Nodes that could not be topologically sorted (cycle candidates): {', '.join(cycle_nodes[:5])}" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -169,7 +169,7 @@ def _generate_internal_node_specs( | |||||
| node_type = get_node_type(node) | ||||||
|
|
||||||
| # Skip special nodes | ||||||
| if node_type in ('input', 'output', 'dataloader'): | ||||||
| if node_type in ('input', 'output', 'dataloader', 'loss'): | ||||||
|
||||||
| if node_type in ('input', 'output', 'dataloader', 'loss'): | |
| if node_type in ('input', 'output', 'dataloader', 'loss', 'metrics', 'groundtruth'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
workflow_dispatchruns don’t have agithub.event.pull_requestpayload, so${{ github.event.pull_request.number }}will be empty and the prompt will be wrong. Add an explicit input for PR number (or usepull_request-based triggers) and build the prompt from that input.