leva 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0019e85833a0d18992a78748b1726d696c77b0fbc778f2ccb1b8f2916f6ed302'
4
- data.tar.gz: e6dd98f6ec9fcb6067d27ee49a482e921ad69154a62fbef867b90d11af19be9f
3
+ metadata.gz: 91394838ea4f4d47fd0968806beee6ce6d30ecc11888565630d76ca0a6d48fc0
4
+ data.tar.gz: 48f3178cf8be1f4fafaf9e485b5e6bab93c54570f71d738623e19d15cb6b2a13
5
5
  SHA512:
6
- metadata.gz: 9ad48cafaf84e3a4899397e4b9eb43c2f1868eded4761afd114e297ca265fd8abd19cf8d29edfe625a93994bff406818d4adf4cb35da5faa54ff17000276eca0
7
- data.tar.gz: e506343e51badf77c050a4aa26abdfcf442fa84432d6f5aaa9f3fd4019a0f933a0d5a2b66fab18a6f89827f27803bdadfbbffd7b79ddf9c4f76187e4dc53ade6
6
+ metadata.gz: e3f8f96aef6161234ceff59cfb81f18d650b4e617aafcbd53badca722720fd065b206a10b3319bd6569c07d1d71ae50398b35081a526c242f691239421200262
7
+ data.tar.gz: 6f33990542e0a0d4c64611fdd5bab3ff6af7b42838350a414801a997ce5aefc72ce54f7c40ee6b1977fd6523616fc18c1d4a036ff02f44e82424b74acf4ad8e9
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Leva is a Ruby on Rails framework for evaluating Language Models (LLMs) using ActiveRecord datasets on production models. It provides a flexible structure for creating experiments, managing datasets, and implementing various evaluation logic on production data with security in mind.
7
7
 
8
- ![Leva - Workbench- Google Chrome@2x](https://github.com/user-attachments/assets/1631a8f7-0634-4554-8f8b-e643062378a8)
8
+ ![ Mac Battery Drain- Warp@2x](https://github.com/user-attachments/assets/6c2ea720-a5ab-4ec4-9272-ee50114fa9f6)
9
9
 
10
10
  ## Installation
11
11
 
@@ -1330,6 +1330,13 @@ strong {
1330
1330
  padding: var(--space-4);
1331
1331
  overflow-y: auto;
1332
1332
  transition: width var(--transition-base), padding var(--transition-base);
1333
+ /* Hide scrollbar while maintaining scroll */
1334
+ scrollbar-width: none;
1335
+ -ms-overflow-style: none;
1336
+ }
1337
+
1338
+ .panel-right::-webkit-scrollbar {
1339
+ display: none;
1333
1340
  }
1334
1341
 
1335
1342
  .panel-right.resizing {
@@ -1833,6 +1840,40 @@ dialog::backdrop {
1833
1840
  }
1834
1841
 
1835
1842
 
1843
+ /* ============================================
1844
+ SCROLLBAR HIDING (while maintaining scroll)
1845
+ ============================================ */
1846
+
1847
+ /* Hide scrollbars globally in workbench panels */
1848
+ .panel,
1849
+ .panel-right,
1850
+ .sidebar-content,
1851
+ .output-block,
1852
+ .result-block,
1853
+ .main-content,
1854
+ .prompt-textarea,
1855
+ .prompt-sidebar,
1856
+ .layout-workbench,
1857
+ .content-body,
1858
+ .output-value {
1859
+ scrollbar-width: none; /* Firefox */
1860
+ -ms-overflow-style: none; /* IE 10+ */
1861
+ }
1862
+
1863
+ .panel::-webkit-scrollbar,
1864
+ .panel-right::-webkit-scrollbar,
1865
+ .sidebar-content::-webkit-scrollbar,
1866
+ .output-block::-webkit-scrollbar,
1867
+ .result-block::-webkit-scrollbar,
1868
+ .main-content::-webkit-scrollbar,
1869
+ .prompt-textarea::-webkit-scrollbar,
1870
+ .prompt-sidebar::-webkit-scrollbar,
1871
+ .layout-workbench::-webkit-scrollbar,
1872
+ .content-body::-webkit-scrollbar,
1873
+ .output-value::-webkit-scrollbar {
1874
+ display: none; /* Chrome, Safari, Opera */
1875
+ }
1876
+
1836
1877
  /* ============================================
1837
1878
  WORKBENCH SPECIFIC
1838
1879
  ============================================ */
@@ -1993,9 +2034,11 @@ dialog::backdrop {
1993
2034
  ============================================ */
1994
2035
 
1995
2036
  .run-controls {
1996
- padding-bottom: var(--space-4);
1997
- border-bottom: 1px solid var(--gray-800);
1998
- margin-bottom: var(--space-4);
2037
+ padding: var(--space-4);
2038
+ background: rgba(26, 25, 24, 0.4);
2039
+ border-radius: var(--radius-lg);
2040
+ border: 1px solid var(--gray-800);
2041
+ margin-bottom: var(--space-3);
1999
2042
  }
2000
2043
 
2001
2044
  .run-selects {
@@ -2024,22 +2067,26 @@ dialog::backdrop {
2024
2067
  ============================================ */
2025
2068
 
2026
2069
  .output-section {
2027
- padding-bottom: var(--space-4);
2028
- border-bottom: 1px solid var(--gray-800);
2029
- margin-bottom: var(--space-4);
2070
+ padding: var(--space-4);
2071
+ background: rgba(26, 25, 24, 0.4);
2072
+ border-radius: var(--radius-lg);
2073
+ margin-bottom: var(--space-3);
2074
+ border: 1px solid var(--gray-800);
2030
2075
  }
2031
2076
 
2032
2077
  .output-header {
2033
2078
  display: flex;
2034
- align-items: baseline;
2079
+ align-items: center;
2035
2080
  justify-content: space-between;
2036
- margin-bottom: var(--space-3);
2081
+ margin-bottom: var(--space-4);
2082
+ padding-bottom: var(--space-3);
2083
+ border-bottom: 1px solid var(--gray-800);
2037
2084
  }
2038
2085
 
2039
2086
  .output-title {
2040
2087
  font-size: var(--text-xs);
2041
2088
  font-weight: 600;
2042
- color: var(--gray-400);
2089
+ color: var(--gray-300);
2043
2090
  text-transform: uppercase;
2044
2091
  letter-spacing: var(--tracking-wide);
2045
2092
  }
@@ -2047,48 +2094,125 @@ dialog::backdrop {
2047
2094
  .output-meta {
2048
2095
  font-size: 10px;
2049
2096
  color: var(--gray-500);
2097
+ display: flex;
2098
+ align-items: center;
2099
+ gap: var(--space-2);
2050
2100
  }
2051
2101
 
2052
2102
  .output-grid {
2053
2103
  display: flex;
2054
2104
  flex-direction: column;
2055
- gap: var(--space-1);
2105
+ gap: var(--space-3);
2056
2106
  }
2057
2107
 
2058
2108
  .output-block {
2059
2109
  background: var(--gray-800);
2060
- border-radius: var(--radius-sm);
2061
- padding: var(--space-2) var(--space-3);
2110
+ border-radius: var(--radius-md);
2111
+ padding: var(--space-3) var(--space-4);
2062
2112
  display: flex;
2063
- align-items: baseline;
2113
+ align-items: flex-start;
2064
2114
  gap: var(--space-3);
2115
+ transition: background-color 0.15s ease, border-color 0.15s ease;
2116
+ }
2117
+
2118
+ .output-block:hover {
2119
+ background: var(--gray-750, #2a2928);
2065
2120
  }
2066
2121
 
2067
2122
  .output-block--expected {
2068
- background: rgba(125, 179, 103, 0.08);
2069
- border-left: 2px solid var(--success-500);
2123
+ background: rgba(125, 179, 103, 0.06);
2124
+ border-left: 3px solid var(--success-500);
2125
+ padding: var(--space-2) var(--space-3);
2126
+ }
2127
+
2128
+ .output-block--expected:hover {
2129
+ background: rgba(125, 179, 103, 0.1);
2130
+ }
2131
+
2132
+ .output-block--expected .output-value {
2133
+ font-weight: 500;
2134
+ color: var(--gray-50);
2070
2135
  }
2071
2136
 
2072
2137
  .output-block--got {
2073
- border-left: 2px solid var(--gray-700);
2138
+ background: var(--gray-850, #222120);
2139
+ border: 1px solid var(--gray-700);
2140
+ border-left: 3px solid var(--gray-600);
2141
+ }
2142
+
2143
+ .output-block--parsed {
2144
+ background: rgba(212, 168, 74, 0.06);
2145
+ border-left: 3px solid var(--accent-500);
2146
+ padding: var(--space-2) var(--space-3);
2147
+ }
2148
+
2149
+ .output-block--parsed:hover {
2150
+ background: rgba(212, 168, 74, 0.1);
2151
+ }
2152
+
2153
+ .output-block--parsed .output-value {
2154
+ font-weight: 500;
2155
+ color: var(--accent-300);
2074
2156
  }
2075
2157
 
2076
2158
  .output-label {
2077
2159
  font-size: 10px;
2078
2160
  font-weight: 600;
2079
- color: var(--gray-500);
2161
+ color: var(--gray-400);
2080
2162
  text-transform: uppercase;
2081
- letter-spacing: 0.03em;
2163
+ letter-spacing: 0.05em;
2082
2164
  flex-shrink: 0;
2083
- width: 56px;
2165
+ min-width: 64px;
2166
+ padding-top: 2px;
2084
2167
  }
2085
2168
 
2086
2169
  .output-value {
2087
2170
  font-family: var(--font-mono);
2088
2171
  font-size: var(--text-sm);
2089
2172
  color: var(--gray-100);
2090
- line-height: 1.5;
2173
+ line-height: 1.6;
2091
2174
  word-break: break-word;
2175
+ white-space: pre-wrap;
2176
+ flex: 1;
2177
+ min-width: 0;
2178
+ }
2179
+
2180
+ /* Long output values get constrained height with scroll */
2181
+ .output-block--got .output-value {
2182
+ max-height: 180px;
2183
+ overflow-y: auto;
2184
+ scrollbar-width: none;
2185
+ -ms-overflow-style: none;
2186
+ font-size: 12px;
2187
+ line-height: 1.7;
2188
+ color: var(--gray-200);
2189
+ }
2190
+
2191
+ .output-block--got .output-value::-webkit-scrollbar {
2192
+ display: none;
2193
+ }
2194
+
2195
+ /* Fade effect for long content */
2196
+ .output-block--got {
2197
+ position: relative;
2198
+ }
2199
+
2200
+ .output-block--got::after {
2201
+ content: '';
2202
+ position: absolute;
2203
+ bottom: 0;
2204
+ left: 0;
2205
+ right: 0;
2206
+ height: 40px;
2207
+ background: linear-gradient(transparent, var(--gray-850, #222120));
2208
+ pointer-events: none;
2209
+ border-radius: 0 0 var(--radius-md) var(--radius-md);
2210
+ opacity: 0;
2211
+ transition: opacity 0.2s;
2212
+ }
2213
+
2214
+ .output-block--got:has(.output-value:not(:hover)):after {
2215
+ opacity: 0.8;
2092
2216
  }
2093
2217
 
2094
2218
  .output-empty {
@@ -2103,20 +2227,25 @@ dialog::backdrop {
2103
2227
  ============================================ */
2104
2228
 
2105
2229
  .eval-section {
2106
- /* No bottom border - last section */
2230
+ padding: var(--space-4);
2231
+ background: rgba(26, 25, 24, 0.4);
2232
+ border-radius: var(--radius-lg);
2233
+ border: 1px solid var(--gray-800);
2107
2234
  }
2108
2235
 
2109
2236
  .eval-header {
2110
2237
  display: flex;
2111
2238
  align-items: center;
2112
2239
  justify-content: space-between;
2113
- margin-bottom: var(--space-3);
2240
+ margin-bottom: var(--space-4);
2241
+ padding-bottom: var(--space-3);
2242
+ border-bottom: 1px solid var(--gray-800);
2114
2243
  }
2115
2244
 
2116
2245
  .eval-title {
2117
2246
  font-size: var(--text-xs);
2118
2247
  font-weight: 600;
2119
- color: var(--gray-400);
2248
+ color: var(--gray-300);
2120
2249
  text-transform: uppercase;
2121
2250
  letter-spacing: var(--tracking-wide);
2122
2251
  }
@@ -2130,8 +2259,8 @@ dialog::backdrop {
2130
2259
  .eval-card {
2131
2260
  flex: 1 1 calc(50% - var(--space-1));
2132
2261
  min-width: 0;
2133
- background: var(--gray-800);
2134
- border: 1px solid transparent;
2262
+ background: var(--gray-850, #222120);
2263
+ border: 1px solid var(--gray-700);
2135
2264
  border-radius: var(--radius-md);
2136
2265
  padding: var(--space-3);
2137
2266
  cursor: pointer;
@@ -2143,6 +2272,8 @@ dialog::backdrop {
2143
2272
 
2144
2273
  .eval-card:hover {
2145
2274
  background: var(--gray-750, #2a2928);
2275
+ border-color: var(--gray-600);
2276
+ transform: translateY(-1px);
2146
2277
  }
2147
2278
 
2148
2279
  .eval-card-inner {
@@ -83,9 +83,9 @@
83
83
  <span class="output-value"><%= runner_result.prediction %></span>
84
84
  </div>
85
85
  <% if runner_result.dataset_record.recordable.extract_regex_pattern && runner_result.parsed_predictions.any? %>
86
- <div class="output-block" style="background: rgba(106, 159, 196, 0.08); border-left: 2px solid var(--info-500);">
86
+ <div class="output-block output-block--parsed">
87
87
  <span class="output-label">
88
- <svg class="icon-sm" style="display: inline; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; color: var(--info-500);" fill="none" viewBox="0 0 24 24" stroke="currentColor">
88
+ <svg class="icon-sm" style="display: inline; width: 12px; height: 12px; margin-right: 4px; vertical-align: -2px; color: var(--accent-500);" fill="none" viewBox="0 0 24 24" stroke="currentColor">
89
89
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" />
90
90
  </svg>
91
91
  Parsed
data/lib/leva/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Leva
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kieran Klaassen