You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally, the report can be exported to a desired format such as [Markdown](https://ramppdev.github.io/ablate/modules/exporters.html#ablate.exporters.Markdown):
106
111
107
112
```python
108
-
ablate.exporters.Markdown().export(report)
113
+
from ablate.exporters import Markdown
114
+
115
+
Markdown().export(report)
109
116
```
110
117
111
118
This will produce a `report.md` file with the following content:
@@ -127,24 +134,53 @@ To compose multiple sources, they can be added together using the `+` operator
127
134
as they represent lists of [Run](https://ramppdev.github.io/ablate/modules/core.html#ablate.core.types.Run) objects:
128
135
129
136
```python
130
-
runs1 =ablate.sources.Mock(...).load()
131
-
runs2 =ablate.sources.Mock(...).load()
137
+
runs1 = Mock(...).load()
138
+
runs2 = Mock(...).load()
132
139
133
140
all_runs = runs1 + runs2 # combines both sources into a single list of runs
134
141
```
135
142
143
+
### Selector Expressions
144
+
145
+
_ablate_ selectors are lightweight expressions that access attributes of experiment runs, such as parameters, metrics, or IDs.
146
+
They support standard Python comparison operators and can be composed using logical operators to define complex query logic:
147
+
148
+
```python
149
+
accuracy = Metric("accuracy", direction="max")
150
+
loss = Metric("loss", direction="min")
151
+
152
+
runs = (
153
+
Query(source.load())
154
+
.filter((accuracy >0.9) & (loss <0.1))
155
+
.all()
156
+
)
157
+
```
158
+
159
+
Selectors return callable predicates, so they can be used in any query operation that requires a condition.
160
+
All standard comparisons are supported: `==`, `!=`, `<`, `<=`, `>`, `>=`.
161
+
Logical operators `&` (and), `|` (or), and `~` (not) can be used to combine expressions:
162
+
163
+
```python
164
+
from ablate.queries import Id
165
+
166
+
select = (Param("model") =="resnet") | (Param("lr") <0.001) # select resnet or LR below 0.001
167
+
168
+
exclude =~(Id() =="run-42") # exclude a specific run by ID
0 commit comments