File size: 2,919 Bytes
3c7c02f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
.grpo-gdpo-root {
--bg-primary: #ffffff;
--bg-secondary: #f5f5f5;
--bg-hover: #e8e8e8;
--text-primary: #1a1a1a;
--text-secondary: #666666;
--border-color: #ddd;
--accent-color: #4a9eff;
--diff-positive: #22c55e;
--diff-negative: #ef4444;
--cell-active: #3b82f6;
--cell-inactive: #94a3b8;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
padding: 1rem;
background: var(--bg-primary);
color: var(--text-primary);
border-radius: 8px;
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.grpo-gdpo-root {
--bg-primary: #1e1e1e;
--bg-secondary: #2d2d2d;
--bg-hover: #3d3d3d;
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--border-color: #444;
--accent-color: #60a5fa;
--diff-positive: #4ade80;
--diff-negative: #f87171;
--cell-active: #60a5fa;
--cell-inactive: #64748b;
}
}
/* Marimo dark mode class support */
.dark .grpo-gdpo-root,
[data-theme="dark"] .grpo-gdpo-root {
--bg-primary: #1e1e1e;
--bg-secondary: #2d2d2d;
--bg-hover: #3d3d3d;
--text-primary: #e0e0e0;
--text-secondary: #a0a0a0;
--border-color: #444;
--accent-color: #60a5fa;
--diff-positive: #4ade80;
--diff-negative: #f87171;
--cell-active: #60a5fa;
--cell-inactive: #64748b;
}
.grpo-gdpo-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1rem;
font-size: 0.9rem;
}
.grpo-gdpo-table th,
.grpo-gdpo-table td {
padding: 0.6rem 0.8rem;
text-align: center;
border: 1px solid var(--border-color);
}
.grpo-gdpo-table th {
background: var(--bg-secondary);
font-weight: 600;
color: var(--text-primary);
}
.grpo-gdpo-table tbody tr:hover {
background: var(--bg-hover);
}
.rollout-label {
font-weight: 500;
text-align: left !important;
color: var(--text-secondary);
}
.reward-cell {
cursor: pointer;
font-weight: 600;
font-size: 1rem;
transition: all 0.15s ease;
user-select: none;
}
.reward-cell:hover {
background: var(--bg-hover);
transform: scale(1.05);
}
.reward-cell[data-value="1"] {
color: var(--cell-active);
}
.reward-cell[data-value="0"] {
color: var(--cell-inactive);
}
.computed-cell {
font-family: "SF Mono", "Consolas", monospace;
color: var(--text-secondary);
}
.diff-cell {
font-family: "SF Mono", "Consolas", monospace;
font-weight: 500;
}
.diff-cell.has-diff {
color: var(--diff-positive);
background: rgba(34, 197, 94, 0.1);
}
.button-row {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
}
.action-btn {
padding: 0.4rem 0.8rem;
border: 1px solid var(--border-color);
border-radius: 4px;
background: var(--bg-secondary);
color: var(--text-primary);
font-size: 0.85rem;
cursor: pointer;
transition: all 0.15s ease;
}
.action-btn:hover:not(:disabled) {
background: var(--bg-hover);
border-color: var(--accent-color);
}
.action-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
|