Skip to content

Hack/grafana mcp #6696

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

Open
wants to merge 72 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
2fcacaa
first attempt
wdvr May 21, 2025
63669eb
second attempt
wdvr May 21, 2025
654a71b
third attempt
wdvr May 21, 2025
b4c058a
fix
wdvr May 21, 2025
daceff2
mcp config
wdvr May 21, 2025
8ab182d
logging
wdvr May 21, 2025
b4fd1c6
unfinished client code
izaitsevfb May 21, 2025
91f0847
fix theme and chunking
wdvr May 21, 2025
9708522
display tool use
izaitsevfb May 22, 2025
89a7394
env file
wdvr May 22, 2025
0f13d02
add claude.md for spawned claude
izaitsevfb May 22, 2025
32b5bf1
embed grafana chart in the response
izaitsevfb May 22, 2025
20b3c98
merge env adn claude
wdvr May 22, 2025
c7a7a98
make CLAUDE.md more concise
izaitsevfb May 22, 2025
7349d12
update page title
izaitsevfb May 22, 2025
eb9667a
update CLAUDE.md with the schema guide
izaitsevfb May 22, 2025
be4aa63
auto scroll, collapes tools, better progress
wdvr May 22, 2025
88bbdd0
remove nested scrolling
izaitsevfb May 22, 2025
3737327
ui fancier
wdvr May 22, 2025
41a6782
logos and auto scrollgst
wdvr May 22, 2025
5166942
typewriter animation
wdvr May 22, 2025
c2e5e77
add emphasis
izaitsevfb May 22, 2025
b0e65ce
more
wdvr May 22, 2025
10a4dfd
open query in clickhouse
wdvr May 22, 2025
8d02f04
token count, ctrl+enter, output for tools
wdvr May 22, 2025
3c51277
fix
wdvr May 22, 2025
5cee3d6
todo list
wdvr May 22, 2025
01a6ea3
font
wdvr May 22, 2025
20ea782
fix autoscroll
wdvr May 22, 2025
91240b7
fix autoscroll even more
wdvr May 22, 2025
90ccd31
update CLAUDE.md
izaitsevfb May 23, 2025
3ad59b5
[Improvement] fix row length bug + enable download as excel sheet (#6…
yangw-dev May 21, 2025
5add202
Setting Windows Long Path (#6648)
atalman May 21, 2025
07b0bbc
[flakybot] Move code around (mostly in preparation for allowing the b…
clee2000 May 21, 2025
c106410
[torchci] Remove package-lock.json, rerun yarn install (#6651)
clee2000 May 22, 2025
1f321fa
cost dashboard: group by instance type (aws runners) (#6657)
wdvr May 23, 2025
f37416e
Add NA as option for most fields in the cost dashboard #6655 (#6656)
wdvr May 23, 2025
39c7d74
AMD (rocm) in cost dashboard (#6658)
wdvr May 23, 2025
162d9ba
[ez][flakybot] Move some tests around (#6660)
clee2000 May 23, 2025
8523002
[BE] Delete special 3.11 handling from setup-miniconda (#6663)
malfet May 26, 2025
3c4e119
Update to 12.8.1 for windows AMI (#6620)
tinglvv May 26, 2025
9ca31ed
Add Amazon EC2 M8g Instances (#6642)
Mousius May 27, 2025
32ce5bd
cost dashboard: table view (#6662)
wdvr May 27, 2025
c922e81
allow users to export cost table as csv (#6672)
wdvr May 27, 2025
ebca745
Support clang in MSVC (#6654)
jathu May 27, 2025
7246099
[BE] refactor csv export for cost dashboard & benchmark (#6673)
wdvr May 28, 2025
05e8ad7
Color fixes for dark mode cost table (#6674)
wdvr May 28, 2025
0d8104a
[BE] fix legend overlapping graph (#6675)
wdvr May 28, 2025
bf0f645
[bots] Change verify disable issues in prep for handling aggregate is…
clee2000 May 28, 2025
a291130
[bots] Allow flakybot to make aggregate issues (#6649)
clee2000 May 28, 2025
49f20c9
Add fbgemm_gpu_genai to allow list (#6677)
atalman May 29, 2025
0faa857
[BE] Use python script and auditwheel for wheel file manipulation (#6…
atalman May 29, 2025
b7d8e64
[BE] Add guidance to set up new lambda in test-infra (#6683)
yangw-dev May 30, 2025
0c1fd12
Windows Canary Testing. Adding windows canary variant (#6686)
atalman May 30, 2025
651c931
[Ephemeral Scale Downs] Reduce min runtime and better track buffer ti…
ZainRizvi May 30, 2025
210af0b
fix timezone in cost dashboard (#6690)
wdvr May 30, 2025
21c8671
[EZ] Minor typo fix (#6689)
ZainRizvi May 30, 2025
e8e422c
[BE] Remove old cruft from user-data.sh file (#6691)
ZainRizvi Jun 2, 2025
27929d0
Bump setuptools from 70.0.0 to 78.1.1 in /tools/torchci (#6641)
dependabot[bot] Jun 2, 2025
0eb43d5
lambda to deploy
wdvr Jun 3, 2025
6a4cb14
Merge branch 'main' into hack/grafana_mcp
wdvr Jun 3, 2025
99a30a4
lint
wdvr Jun 4, 2025
6ad055f
add authorization check to the /mcp_query page
izaitsevfb Jun 7, 2025
9b50308
format code
izaitsevfb Jun 7, 2025
5af9e5e
add binary for claude
wdvr Jun 7, 2025
3664c63
fix type errors
izaitsevfb Jun 7, 2025
12ce2b0
remove dead code
izaitsevfb Jun 7, 2025
871e983
Update .env.example
wdvr Jun 7, 2025
72e05bb
cleanup
wdvr Jun 12, 2025
a4acff5
fix
wdvr Jun 12, 2025
bd5d318
Update lambda-do-release-runners.yml
wdvr Jun 12, 2025
13bf79e
line
wdvr Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aws/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ go to [pytorch-gha-infra](https://github.com/pytorch-labs/pytorch-gha-infra)
- Update the release-tag and add your zip file name in [runners/common/Terrafile](https://github.com/pytorch-labs/pytorch-gha-infra/blob/main/runners/common/Terrafile)
- During the deploy process, the workflow will download your file based on the Terrafile.
- If you need clichouse account permission, you need ask pytorch dev infra teammate to create a clichouse role for your lambda.
- you need to add the clickhouse role secret to the repo secret, `bunnylol oss pytorch-labs/pytorch-gha-infra` and update it in settings-> secrets.
- you need to add the clickhouse role secret to the repo secret, `bunnylol oss pytorch-labs/pytorch-gha-infra` and update it in settings-> secrets.

### Deploy the lambda
Once the pr is submitted, go to [Runners Do Terraform Release (apply)](https://github.com/pytorch-labs/pytorch-gha-infra/actions/workflows/runners-on-dispatch-release.yml), and click Run workflow.
4 changes: 4 additions & 0 deletions torchci/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ OPENSEARCH_PASSWORD=
CLICKHOUSE_HUD_USER_URL=
CLICKHOUSE_HUD_USER_USERNAME=
CLICKHOUSE_HUD_USER_PASSWORD=

# Lambda function URL and auth token for Grafana MCP (TorchDash)
GRAFANA_MCP_LAMBDA_URL=
GRAFANA_MCP_AUTH_TOKEN=
201 changes: 201 additions & 0 deletions torchci/components/AISpinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
import { keyframes } from "@emotion/react";
import styled from "@emotion/styled";
import { useTheme } from "@mui/material";
import React from "react";

// Define animations for the cubes and sparkles
const pulse = keyframes`
0% { transform: scale(0.8); opacity: 0.3; }
50% { transform: scale(1); opacity: 1; }
100% { transform: scale(0.8); opacity: 0.3; }
`;

const float = keyframes`
0% { transform: translateY(0) rotate(0); opacity: 0.2; }
50% { transform: translateY(-10px) rotate(45deg); opacity: 1; }
100% { transform: translateY(-20px) rotate(90deg); opacity: 0; }
`;

const sparkle = keyframes`
0% { transform: scale(0); opacity: 0; }
50% { transform: scale(1); opacity: 1; }
100% { transform: scale(0); opacity: 0; }
`;

const Container = styled.div`
position: relative;
width: 70px;
height: 70px;
display: flex;
justify-content: center;
align-items: center;
margin-right: 6px; // Ensures the sparkles don't overlap with text
`;

const CubeContainer = styled.div`
position: relative;
width: 65px;
height: 65px;
transform-style: preserve-3d;
transform: rotateX(45deg) rotateZ(45deg);
`;

const Cube = styled.div<{ delay: number; color: string; size: string }>`
position: absolute;
width: ${(props) => props.size};
height: ${(props) => props.size};
background: ${(props) => props.color};
opacity: 0.8;
border-radius: 2px;
animation: ${pulse} 1.8s ease-in-out infinite;
animation-delay: ${(props) => props.delay}s;
box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
`;

const Sparkle = styled.div<{
delay: number;
color: string;
size: string;
top: string;
left: string;
}>`
position: absolute;
width: ${(props) => props.size};
height: ${(props) => props.size};
top: ${(props) => props.top};
left: ${(props) => props.left};
background: ${(props) => props.color};
border-radius: 50%;
opacity: 0.8;
animation: ${sparkle} 2s ease-in-out infinite;
animation-delay: ${(props) => props.delay}s;
box-shadow: 0 0 8px ${(props) => props.color};
`;

const FloatingParticle = styled.div<{
delay: number;
color: string;
size: string;
top: string;
left: string;
}>`
position: absolute;
width: ${(props) => props.size};
height: ${(props) => props.size};
top: ${(props) => props.top};
left: ${(props) => props.left};
background: ${(props) => props.color};
opacity: 0;
animation: ${float} 3s ease-in-out infinite;
animation-delay: ${(props) => props.delay}s;
`;

const AISpinner: React.FC = () => {
const theme = useTheme();
const primaryColor = theme.palette.primary.main;
const secondaryColor = theme.palette.secondary.main;

// Position for the 4 cubes in a grid - more square now
const cubes = [
{ top: "0px", left: "0px", delay: 0, size: "28px" },
{ top: "0px", left: "32px", delay: 0.3, size: "28px" },
{ top: "32px", left: "0px", delay: 0.6, size: "28px" },
{ top: "32px", left: "32px", delay: 0.9, size: "28px" },
];

// Create sparkles
const sparkles = [
{
top: "-10px",
left: "20px",
delay: 0.2,
size: "6px",
color: primaryColor,
},
{
top: "20px",
left: "-10px",
delay: 0.7,
size: "5px",
color: secondaryColor,
},
{ top: "50px", left: "20px", delay: 0.4, size: "7px", color: primaryColor },
{
top: "20px",
left: "65px",
delay: 0.9,
size: "5px",
color: secondaryColor,
},
{ top: "70px", left: "60px", delay: 1.2, size: "4px", color: primaryColor },
{
top: "-15px",
left: "50px",
delay: 1.5,
size: "5px",
color: secondaryColor,
},
];

// Floating particles
const particles = [
{ top: "20px", left: "5px", delay: 0.2, size: "5px", color: primaryColor },
{
top: "15px",
left: "60px",
delay: 0.8,
size: "4px",
color: secondaryColor,
},
{ top: "55px", left: "55px", delay: 1.3, size: "6px", color: primaryColor },
{
top: "40px",
left: "-5px",
delay: 1.7,
size: "3px",
color: secondaryColor,
},
];

return (
<Container>
<CubeContainer>
{cubes.map((cube, index) => (
<Cube
key={`cube-${index}`}
style={{ top: cube.top, left: cube.left }}
delay={cube.delay}
size={cube.size}
color={index % 2 === 0 ? primaryColor : secondaryColor}
/>
))}
</CubeContainer>

{/* Add sparkles */}
{sparkles.map((spark, index) => (
<Sparkle
key={`sparkle-${index}`}
delay={spark.delay}
color={spark.color}
size={spark.size}
top={spark.top}
left={spark.left}
/>
))}

{/* Add floating particles */}
{particles.map((particle, index) => (
<FloatingParticle
key={`particle-${index}`}
delay={particle.delay}
color={particle.color}
size={particle.size}
top={particle.top}
left={particle.left}
/>
))}
</Container>
);
};

export default AISpinner;
Loading