Skip to content

Commit fe4a426

Browse files
committed
Commit skydeck files
1 parent 6562d4a commit fe4a426

File tree

5 files changed

+103
-8
lines changed

5 files changed

+103
-8
lines changed

projects/skydeck/skydeck/database.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ async def update_experiment_expanded(self, experiment_id: str, is_expanded: bool
296296
async def rename_experiment(self, old_id: str, new_id: str):
297297
"""Rename an experiment (change its ID).
298298
299-
This updates the experiment ID and all references to it in jobs.
299+
This updates the experiment ID and all references to it in jobs and checkpoints.
300300
"""
301301
# Update the experiment ID
302302
await self._conn.execute(
@@ -318,6 +318,16 @@ async def rename_experiment(self, old_id: str, new_id: str):
318318
(new_id, old_id),
319319
)
320320

321+
# Update all checkpoints that reference this experiment
322+
await self._conn.execute(
323+
"""
324+
UPDATE checkpoints
325+
SET experiment_id = ?
326+
WHERE experiment_id = ?
327+
""",
328+
(new_id, old_id),
329+
)
330+
321331
await self._conn.commit()
322332

323333
# Job operations
@@ -527,6 +537,7 @@ def _row_to_experiment(self, row: aiosqlite.Row) -> Experiment:
527537
group=row["exp_group"],
528538
order=row["exp_order"],
529539
is_expanded=bool(row["is_expanded"]) if "is_expanded" in row.keys() else False,
540+
starred=bool(row["starred"]) if "starred" in row.keys() else False,
530541
)
531542

532543
def _row_to_job(self, row: aiosqlite.Row) -> Job:

projects/skydeck/skydeck/static/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,8 @@ function createExpandedRow(exp, numFlagColumns) {
806806
</div>
807807
<div class="detail-grid" id="config-grid-${exp.id}">
808808
<span class="detail-label">Experiment ID:</span>
809-
<span class="detail-value config-field" data-field="id">
810-
${exp.id}
809+
<span class="detail-value">
810+
<span class="config-field" data-field="id">${exp.id}</span>
811811
<button class="copy-btn" onclick="event.stopPropagation(); copyToClipboard('${exp.id.replace(/'/g, "\\'")}', event); return false;" title="Copy experiment ID">⎘</button>
812812
<a href="https://wandb.ai/metta-research/metta/runs/${exp.id}" target="_blank" class="wandb-link" onclick="event.stopPropagation();" title="Open in W&B">W&B</a>
813813
</span>

projects/skydeck/skydeck/static/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>SkyDeck Dashboard</title>
7-
<link rel="stylesheet" href="/static/styles.css?v=22">
7+
<link rel="stylesheet" href="/static/styles.css?v=23">
88
</head>
99
<body>
1010
<div class="container">
@@ -184,6 +184,6 @@ <h2 style="margin: 0;">SkyPilot Jobs</h2>
184184
<!-- Notification Container -->
185185
<div id="notification-container" class="notification-container"></div>
186186

187-
<script src="/static/app.js?v=69"></script>
187+
<script src="/static/app.js?v=70"></script>
188188
</body>
189189
</html>

projects/skydeck/skydeck/static/styles.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,10 +646,11 @@ tbody tr.main-row td {
646646
font-size: 28px;
647647
padding: 2px 4px;
648648
opacity: 0.6;
649-
transition: opacity 0.2s;
649+
transition: all 0.2s;
650650
display: inline-block;
651651
vertical-align: middle;
652652
margin-left: 4px;
653+
border-radius: 3px;
653654
}
654655

655656
.copy-btn-left {
@@ -674,12 +675,14 @@ tbody tr.main-row td {
674675
}
675676

676677
.wandb-link:hover {
677-
border-color: #333;
678-
color: #333;
678+
border-color: #FF6B00;
679+
color: white;
680+
background: #FF6B00;
679681
}
680682

681683
.copy-btn:hover {
682684
opacity: 1;
685+
background: #e3f2fd;
683686
}
684687

685688
/* Storage pills */

projects/skydeck/test_page.py

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
"""Test script to diagnose the star button issue with Playwright."""
2+
3+
import asyncio
4+
5+
from playwright.async_api import async_playwright
6+
7+
8+
async def main():
9+
async with async_playwright() as p:
10+
browser = await p.chromium.launch(headless=False)
11+
page = await browser.new_page()
12+
13+
# Navigate to the dashboard
14+
await page.goto("http://127.0.0.1:8000")
15+
16+
# Wait for experiments to load
17+
await page.wait_for_selector("tr.main-row", timeout=10000)
18+
19+
# Get the first experiment row
20+
first_row = await page.query_selector("tr.main-row")
21+
22+
if first_row:
23+
# Get the data-exp-id attribute
24+
exp_id = await first_row.get_attribute("data-exp-id")
25+
print(f"Row data-exp-id: {exp_id}")
26+
27+
# Get the ID cell content
28+
id_cell = await first_row.query_selector("td.col-id")
29+
id_text = await id_cell.text_content()
30+
print(f"ID cell text content: {repr(id_text)}")
31+
32+
# Get the span with the actual ID
33+
id_span = await id_cell.query_selector("span")
34+
if id_span:
35+
span_text = await id_span.text_content()
36+
print(f"ID span text: {repr(span_text)}")
37+
38+
# Check if there's a checkpoints container in an expanded row
39+
expanded_row = await page.query_selector(f'tr.expanded-row[data-exp-id="{exp_id}"]')
40+
if expanded_row:
41+
print("Expanded row exists")
42+
checkpoints_div = await expanded_row.query_selector(f"#checkpoints-{exp_id}")
43+
if checkpoints_div:
44+
print(f"Found checkpoints container with ID: checkpoints-{exp_id}")
45+
else:
46+
print(f"Checkpoints container NOT found with ID: checkpoints-{exp_id}")
47+
# Try to find what ID it actually has
48+
all_checkpoint_divs = await expanded_row.query_selector_all("[id^='checkpoints-']")
49+
for div in all_checkpoint_divs:
50+
actual_id = await div.get_attribute("id")
51+
print(f"Found checkpoints container with ID: {actual_id}")
52+
53+
# Click the row to expand it
54+
print("\nClicking row to expand...")
55+
await first_row.click()
56+
await page.wait_for_timeout(1000) # Wait for expansion
57+
58+
# Check the expanded row again
59+
expanded_row = await page.query_selector(f'tr.expanded-row[data-exp-id="{exp_id}"].show')
60+
if expanded_row:
61+
print("Row is now expanded")
62+
checkpoints_div = await expanded_row.query_selector(f"#checkpoints-{exp_id}")
63+
if checkpoints_div:
64+
print(f"Checkpoints container found: checkpoints-{exp_id}")
65+
else:
66+
print(f"Checkpoints container STILL not found: checkpoints-{exp_id}")
67+
# Find all divs with checkpoints prefix
68+
all_divs_with_id = await expanded_row.query_selector_all("[id]")
69+
for div in all_divs_with_id:
70+
actual_id = await div.get_attribute("id")
71+
if "checkpoints" in actual_id:
72+
print(f"Found: {actual_id}")
73+
74+
# Keep browser open for inspection
75+
print("\nBrowser will stay open for 10 seconds...")
76+
await page.wait_for_timeout(10000)
77+
await browser.close()
78+
79+
80+
if __name__ == "__main__":
81+
asyncio.run(main())

0 commit comments

Comments
 (0)