Skip to content
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

Terminology: weight, score, and metrics #504

Open
TonyGravagno opened this issue May 5, 2021 · 2 comments
Open

Terminology: weight, score, and metrics #504

TonyGravagno opened this issue May 5, 2021 · 2 comments

Comments

@TonyGravagno
Copy link
Contributor

Is "weight" the same as "score" ? A symbol definition object supports both properties 'weight' and 'score', which I believe are synonyms. The terms are often used interchangeably. Is there any distinction in thoughts, discussions, or code?

If this is the same concept, I'll adjust text when it seems the docs imply a distinction. Usually, the doc seems inconsistent, for example with notes like this (contrived example) "here is how to change the weight: score=1; ", and elsewhere, "here is how to change the score: weight=1; ".

--
The definition of "Metrics" doesn't really clarify what a metric is. Is it the same as a "group"?

The weight of rules is defined in metrics. Each metric is a set of grouped rules with specific weights.

The metric section was deprecated in v1.7 according to the metrics.conf file. Was just the file deprecated? Or does that mean the metric section itself was deprecated, and replaced with actions and groups?

If the term "metric" no longer has a specific meaning, can we remove that term in the docs as well, or at least remove the implication that the term has specific meaning?

The metrics.html page is titled "Rspamd Metrics", and the link from the menu is "Symbols scores and metrics setup", but the word "metric" is only found a few places on the page, not as a keyword. There is a reference to the metric section in this FAQ.

The metrics option is defined in metric_exporter.conf. Is that exporter now deprecated as well? Or has the code been changed, just without a doc change?

This note on "composite weight rules" mentions a metric as a grouping, but doesn't actually explain that:

Composites can record symbols in a metric or record their weights. That could be used to create non-captive composites.

What does it mean by "recording symbols in a metric"?
And what is a "non-captive" composite?

With clarifications, I'll make doc updates.
Thanks

@moisseev
Copy link
Member

moisseev commented May 5, 2021

Is "weight" the same as "score" ?

In my opinion, as we have symbols with dynamic weights(or scores), it would be logical to have distinct terms weight and score: score = weight * multiplier or vice versa. But I am not sure if we can appropriately change properties in configuration files.


The metric section was deprecated in v1.7 according to the metrics.conf file. Was just the file deprecated? Or does that mean the metric section itself was deprecated, and replaced with actions and groups?

Both metric section and metrics.conf file were deprecated and replaced with groups, but they are still supported to maintain configuration compatibility.

https://rspamd.com/doc/migration.html#migration-to-rspamd-170

If the term "metric" no longer has a specific meaning, can we remove that term in the docs as well, or at least remove the implication that the term has specific meaning?

I think we should remove it everywhere in the docs, but create a section about legacy terms and configuration options and mention it there.

What does it mean by "recording symbols in a metric"?

"record symbols in a metric or record their weights" in other words: "add new symbols or change scores of existing symbols".

And what is a "non-captive" composite?

I guess this mean a composite symbol which can be removed if other composite rule wants to remove it.

@TonyGravagno
Copy link
Contributor Author

Good responses, sincere thanks. Looking for confirmations and actionable decisions so I can make some changes. I'll try to keep changes related to these topics small for easier acceptance/rejection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants