Selecting metric and --show-preprocessed work in the diff mode

This commit is contained in:
Filip Gralinski 2020-09-12 10:45:24 +02:00
parent 1e54427982
commit 5bd2eee13e
1 changed files with 5 additions and 2 deletions

View File

@ -557,6 +557,7 @@ runMostWorseningFeatures ordering otherOut spec bbdo = do
runDiffGeneralized :: ResultOrdering -> FilePath -> GEvalSpecification -> (Maybe References -> ConduitT (LineRecord, LineRecord) Void (ResourceT IO) a) -> IO a runDiffGeneralized :: ResultOrdering -> FilePath -> GEvalSpecification -> (Maybe References -> ConduitT (LineRecord, LineRecord) Void (ResourceT IO) a) -> IO a
runDiffGeneralized ordering otherOut spec consum = do runDiffGeneralized ordering otherOut spec consum = do
dataSourceB <- checkAndGetDataSource True spec dataSourceB <- checkAndGetDataSource True spec
let dataSourceB' = addSchemeSpecifics scheme dataSourceB
ooss <- getSmartSourceSpec ((gesOutDirectory spec) </> (gesTestName spec)) "out.tsv" otherOut ooss <- getSmartSourceSpec ((gesOutDirectory spec) </> (gesTestName spec)) "out.tsv" otherOut
case ooss of case ooss of
Left NoSpecGiven -> throwM $ NoOutFile otherOut Left NoSpecGiven -> throwM $ NoOutFile otherOut
@ -567,13 +568,15 @@ runDiffGeneralized ordering otherOut spec consum = do
let dataSourceA = DataSource { let dataSourceA = DataSource {
dataSourceChallengeData = chDataSource, dataSourceChallengeData = chDataSource,
dataSourceOut = otherOutSource} dataSourceOut = otherOutSource}
let sourceA = gevalLineByLineSource metric dataSourceA let dataSourceA' = addSchemeSpecifics scheme dataSourceA
let sourceB = gevalLineByLineSource metric dataSourceB let sourceA = gevalLineByLineSource metric dataSourceA'
let sourceB = gevalLineByLineSource metric dataSourceB'
runResourceT $ runConduit $ runResourceT $ runConduit $
((getZipSource $ (,) ((getZipSource $ (,)
<$> ZipSource sourceA <$> ZipSource sourceA
<*> ZipSource sourceB) .| sorter ordering .| consum mReferences) <*> ZipSource sourceB) .| sorter ordering .| consum mReferences)
where metric = gesMainMetric spec where metric = gesMainMetric spec
scheme = gesMainScheme spec
preprocess = gesPreprocess spec preprocess = gesPreprocess spec
mSelector = gesSelector spec mSelector = gesSelector spec
sorter KeepTheOriginalOrder = doNothing sorter KeepTheOriginalOrder = doNothing