-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for configured pipelines like Line's format #79
Conversation
intarga
commented
Oct 2, 2024
•
edited
Loading
edited
- deserialize pipeline config files
- replace DAG with pipeline map in scheduler
- fix breakage
- derive num_leading and num_trailing from the pipeline
- fix references to DAG in documentation
e8c1f37
to
1883aa7
Compare
311f746
to
a683c9e
Compare
Compared to the old yaml version there is a lot of repetition here (and I'm also not a big fan of toml's array-of-table syntax 😅). What do you think about instead using: - [[steps]]
- name = "special_value_check"
- [steps.check.special_value_check]
+ [steps.special_value_check]
special_values = [-999999, -6999, -99.9, -99.8, 999, 6999, 9999] And then deserializing with the + #[serde_with::serde_as]
#[derive(Debug, Deserialize, PartialEq, Clone)]
pub struct Pipeline {
/// Sequence of steps in the pipeline
- pub steps: Vec<PipelineStep>,
+ #[serde_as(as = "serde_with::EnumMap")]
+ pub steps: Vec<CheckConf>,
/// Minimum number of leading points required by all the tests in this pipeline
#[serde(skip)]
pub num_leading_required: u8,
/// Minimum number of trailing points required by all the tests in this pipeline
#[serde(skip)]
pub num_trailing_required: u8,
} But we would also need to convert the |
The name and the enum variant are actually doing different things here. the enum variant decides what check will be run, but the name will label the flags that get returned. These are not always the same, for example WP5 have talked about having mutliple range checks (one for instrument limits, one to reject based on heuristics, one that will not flag for end users, but will alert HQC to look at suspicious data). These will all use the same enum variant, but will have different names. |
Yes, that's why I said we should have an optional name field if we have the same check with different parameters. However what I proposed won't work anyway, because EnumMap will panic if you have duplicate tables 😞 (lol I forgot how toml works) |
I like the idea of being able to use a default name, though. And that would get rid of unnecessary repetition. I worry it might make the format more confusing, but as long as we document it clearly it should be ok. I also don't like the array of tables syntax, but I don't think we have another option if we want to use toml 🙁 |
Oh that's a shame. I think we could still make it work with a custom deserializer though. Only issue is whether it's worth taking on the maintenance burden associated with that. I'll let you make a decide on that, and I'll implement it if you say so. |
That's not fair 🤣 But duplicate fields are not valid in TOML, so I don't think it's worth it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, it's a good foundation we can iterate on with the others. I only have a couple of comments.
314546f
to
33e2344
Compare
Apparently singular naming style for array-of-tables is allowed, so we can use |
@Lun4m I think we're good to go on this! |