refactor for Gonito

This commit is contained in:
Filip Gralinski 2018-07-14 09:48:45 +02:00
parent 0c6032d166
commit c0fd359590
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,5 @@
name: geval
version: 1.1.1.1
version: 1.1.2.0
synopsis: Machine learning evaluation tools
description: Please see README.md
homepage: http://github.com/name/project

View File

@ -38,6 +38,7 @@ module GEval.Core
checkAndGetFiles,
checkAndGetFilesSingleOut,
checkMultipleOuts,
checkMultipleOutsCore,
gesMainMetric
) where
@ -335,7 +336,13 @@ checkAndGetFiles forceInput gevalSpec = do
metrics = gesMetrics gevalSpec
checkMultipleOuts :: GEvalSpecification -> IO (Maybe [FilePath])
checkMultipleOuts gevalSpec = do
checkMultipleOuts gevalSpec = checkMultipleOutsCore outDirectory testName outFile
where outFile = gesOutFile gevalSpec
outDirectory = gesOutDirectory gevalSpec
testName = gesTestName gevalSpec
checkMultipleOutsCore :: FilePath -> FilePath -> FilePath -> IO (Maybe [FilePath])
checkMultipleOutsCore outDirectory testName outFile = do
-- if the out.tsv is there, just use it
outFilePath <- lookForCompressedFiles (outTestDirectory </> outFile)
isSimpleOutThere <- D.doesFileExist outFilePath
@ -349,10 +356,7 @@ checkMultipleOuts gevalSpec = do
else
return Nothing
where outFile = gesOutFile gevalSpec
outTestDirectory = outDirectory </> testName
outDirectory = gesOutDirectory gevalSpec
testName = gesTestName gevalSpec
where outTestDirectory = outDirectory </> testName
getOutFile :: GEvalSpecification -> FilePath -> FilePath
getOutFile gevalSpec out = outDirectory </> testName </> out