How to filter runs using multiple flag values

Hi,

I would like to know if there is a way to filter runs using multiple flag values.

For example I have a batch of runs with flags: a=1/2/3, b=4/5/6 (so in total 9 runs). And I would like to filter the runs using

guild runs -Fl a=1 -Fl b=4

I expect it return runs with a=1 AND b=4
But seems the command would return runs with a=1 OR b=4?

So how can I get runs with a=1 AND b=4? Thanks!

Sorry for the late reply here! The filter options for label use OR, not AND, as you observe. There’s no way to apply an AND there.

There’s an upcoming generalize query/select feature, however, that you’ll be able to use for this. I’m sorry that doesn’t really help you now though.

I’ll bump this priority and see if we can’t get this out in 0.7.5.

1 Like

Any update on this?

This has been added and is available in the latest pre-release (0.8.2.dev1 I believe). Guild now supports a generalized filter spec with the --filter, -F option. You can get some docs using --help for the applicable command - look for “filter by expression” in the help text.

The command for the example above would be:

guild runs -F 'a=1 and b=4'

I created an issue resolution doc for this to document the fix. In particular, see:

2 Likes