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
When running AnomalyChecks via VerificationSuite with a InMemoryMetricsRepository, and have configured analyzerOptions on the Analyzer, all checks pass as expected.
However, when simply switching to FileSystemMetricsRepository, the same checks fail.
when using an InMemoryMetricsRepository, we can see the results passing:
val results = verificationBuilder.run()
assert(results.status == CheckStatus.Success)
results.checkResults.head._2.constraintResults.head
ConstraintResult(
AnomalyConstraint(
Compliance(`values` is red,`values` IN ('red'),None,List(),Some(AnalyzerOptions(Ignore,NULL)))),
Success,
None,
Some(DoubleMetric(Column,Compliance,`values` is red,Success(0.7),Some((values IN (red))))
)
)
Using FileSystemMetricsRepository
However, when switching to a FileSystemMetricsRepository, the same execution fails:
ConstraintResult(
AnomalyConstraint(
Compliance(`values` is red,`values` IN ('red'),None,List(),Some(AnalyzerOptions(Ignore,NULL)))),
Failure,
Some(Can't execute the assertion: requirement failed: Excluding values in searchInterval from calculation but not enough values remain to calculate mean and stdDev.!),
Some(DoubleMetric(Column,Compliance,`values` is red,Success(0.7),Some((values IN (red))))
)
)
When inspecting the metrics json file, we can see that analyzerOptions are not present in any of the historical metrics. Here is a sample of one of the results in the file:
When analyzerOptions are removed from the Analyzer, and the FileSystemMetricsRepository is used, all checks pass as expected (as the current check constraint is able to match historical values from the repository).
val verificationBuilder = VerificationSuite()
.onData(currentData)
.useRepository(metricsRepository)
.saveOrAppendResult(ResultKey(LocalDateTime.now().toInstant(ZoneOffset.UTC).toEpochMilli))
.addAnomalyCheck(
BatchNormalStrategy(
lowerDeviationFactor = Some(1),
upperDeviationFactor = Some(1)
),
Compliance(
s"`values` is red",
s"`values` IN ('red')"
),
None
)
val results = verificationBuilder.run()
assert(results.status == CheckStatus.Success)
If analyzerOptions is required, using InMemoryMetricsRepository resolves this issue as well.
Expected behavior
AnalyzerOptions should be able to be used when using FileSystemMetricsRepository.
Changing the metrics repository should not change the execution result of the verification suite, as the results in any instance of MetricsRepository should be identical and cross-compatible.
The text was updated successfully, but these errors were encountered:
Describe the bug
When running
AnomalyChecks
viaVerificationSuite
with aInMemoryMetricsRepository
, and have configuredanalyzerOptions
on theAnalyzer
, all checks pass as expected.However, when simply switching to
FileSystemMetricsRepository
, the same checks fail.To Reproduce
Given a dataframe such as:
and given a bare minimum
VerificationSuite
withanalyzerOptions
like:Using InMemoryMetricsRepository
when using an
InMemoryMetricsRepository
, we can see the results passing:Using FileSystemMetricsRepository
However, when switching to a
FileSystemMetricsRepository
, the same execution fails:When inspecting the metrics json file, we can see that analyzerOptions are not present in any of the historical metrics. Here is a sample of one of the results in the file:
Workarounds
When
analyzerOptions
are removed from the Analyzer, and theFileSystemMetricsRepository
is used, all checks pass as expected (as the current check constraint is able to match historical values from the repository).If
analyzerOptions
is required, usingInMemoryMetricsRepository
resolves this issue as well.Expected behavior
FileSystemMetricsRepository
.MetricsRepository
should be identical and cross-compatible.The text was updated successfully, but these errors were encountered: