2 writes to Path
Microsoft.ML.TestFramework (2)
TestCommandBase.cs (2)
51Path = path; 67Path = _testCmd.DeleteOutputPath(_dir, _name);
96 references to Path
Microsoft.ML.TestFramework (96)
BaseTestPredictorsMaml.cs (9)
153AddIfNotEmpty(args, ctx.ModelOverride.Path, "in"); 174string str = string.Format("SavePredictorAs in={{{0}}}", modelPath.Path); 212RunResultProcessorTest(new string[] { consOutPath.Path }, rpOutPath, rpArgs); 263if (CheckTestOutputMatchesTrainTest(consOutPath.Path, consOutPath2.Path, 1)) 264File.Delete(consOutPath2.Path); 270using (var writer = OpenWriter(consOutPath.Path, true)) 273writer.WriteLine("Loaded predictor test results differ! Compare baseline with {0}", consOutPath2.Path); 450if (val != null && !string.IsNullOrWhiteSpace(val.Path))
TestCommandBase.cs (87)
85return string.Format("{0}={{{1}}}", name, Path); 297using (var newWriter = OpenWriter(outputPath.Path)) 537using (var file = Env.OpenInputFile(model.Path)) 732string modelPath = ModelPath().Path; 756File.WriteAllLines(path.Path, new string[] { 761TestCore("showdata", path.Path, "loader=text{col=A:I4:0-1 col=B:I4:~ header+ sep=comma}", ""); 772File.WriteAllLines(path2.Path, new string[] { 777TestInOutCore("showdata", path2.Path, modelPath, ""); 901string extraArgs = $"tr=FastRankRanking{{t=1}} strat=Strat prexf=rangefilter{{col=Label min=20 max=25}} prexf=term{{col=Strat:Label}} xf=term{{col=Label}} xf=hash{{col=GroupId}} threads- norm=Warn dout={{{perInstFile.Path}}}"; 1055TestCore("traintest", transTrainData.Path, "loader=trans", extraArgs, 1305File.WriteAllLines(dataPath.Path, new string[] { 1312string extraArgs = string.Format("test={{{0}}} tr=ftrank{{mil=1 nl=2 iter=5 gains={1} dt+}} eval=rank{{gains={1}}}", dataPath.Path, customGains); 1314TestCore("traintest", dataPath.Path, loaderArgs, extraArgs, metricsFile.Arg("dout")); 1382CheckEqualityFromPathsCore(TestName, scorePath.Path, scorePath2.Path); 1443TestCore("savedata", scorePath.Path, "loader=binary xf=Copy{col=PredictedLabel1:PredictedLabel col=Score1:Score}", 1450TestCore("savedata", scorePath2.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1455TestCore("evaluate", scorePath2.Path, null, "lab=L"); 1462TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs); 1465CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1481TestCore("evaluate", scorePath.Path, null, "evaluator=Binary{threshold=0.9 useRawScore-} lab=L"); 1485TestCore("evaluate", scorePath.Path, null, "evaluator=Binary{threshold=2} lab=L"); 1495TestCore("evaluate", scoreCustomCols.Path, null, "evaluator=Binary{score=Score1 prob=Probability1} lab=L"); 1521TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1526TestCore("evaluate", scorePath.Path, "", ""); 1533TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, null, metricsPath.Arg("dout")); 1543TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs2, null, metricsPath.Arg("dout")); 1568TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1574TestCore("evaluate", scorePath.Path, "", "", metricPath1.Arg("dout")); 1582TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs, metricPath2.Arg("dout")); 1585CheckEqualityFromPathsCore(TestName, metricPath1.Path, metricPath2.Path); 1586CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1612TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1617TestCore("evaluate", scorePath.Path, "", ""); 1624TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs); 1627CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1723TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1728TestCore("evaluate", scorePath.Path, "", ""); 1735TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs); 1738CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1764TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1770TestCore("evaluate", scorePath.Path, "", "", metricsFile1.Arg("dout")); 1777TestReloadedCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs, null); 1780CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1828TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1857TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1862TestCore("evaluate", scorePath.Path, "", ""); 1870TestCore("evaluate", scorePathTxt.Path, evalLoaderArgs, evalExtraArgs, metricsPath.Arg("dout")); 1873CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1904TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 1912TestCore("evaluate", scorePath.Path, "", null, summaryFile1.Arg("sf"), metricsFile1.Arg("dout")); 1920TestCore("evaluate", scorePathTxt.Path, "loader=Text", "eval=Ranking{score=Score}", 1923CheckEqualityFromPathsCore(TestName, outputFile1.Path, outputFile2.Path); 1924CheckEqualityFromPathsCore(TestName, summaryFile1.Path, summaryFile2.Path); 1925CheckEqualityFromPathsCore(TestName, metricsFile1.Path, metricsFile2.Path); 1986TestCore("savedata", scorePath.Path, "loader=binary", "saver=text", scorePathTxt.Arg("dout")); 2046using (var newWriter = OpenWriter(outputPath.Path)) 2075using (var newWriter = OpenWriter(outputPath.Path)) 2101string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; 2102using (var newWriter = OpenWriter(outputPath.Path)) 2131string args = $"data={data} test={data} valid={data} in={model.Path} cont+" + " " + loaderArgs + " " + extraArgs; 2132using (var newWriter = OpenWriter(outputPath.Path)) 2155TestCore("savedata", intermediateData.Path, "loader=binary", "saver=text", textOutputPath.Arg("dout")); 2172TestCore("showdata", dataPath, string.Format("in={{{0}}}", modelPath.Path), ""); 2189TestCore("showdata", dataPath, string.Format("in={{{0}}}", modelPath.Path), ""); 2209TestCore("showdata", dataPath, string.Format("in={{{0}}}", modelPath.Path), ""); 2227TestCore("showdata", dataPath, string.Format("in={{{0}}}", modelPath.Path), ""); 2238File.WriteAllLines(path.Path, new string[] { 2246var pathA = path.Path; 2248TestReloadedCore("showdata", path.Path, "loader=svm{size=5}" + chooseXf, "", ""); 2253TestCore("showdata", path.Path, "loader=svm" + chooseXf, ""); 2260File.WriteAllLines(path.Path, new string[] { 2264TestReloadedCore("showdata", path.Path, "loader=svm{indices=names}" + chooseXf, "", ""); 2270File.WriteAllLines(path.Path, new string[] { 2274TestInCore("showdata", path.Path, modelPath, ""); 2278File.WriteAllLines(path.Path, new string[] { "1 aurora:2 :3" }); 2279TestReloadedCore("showdata", path.Path, "loader=svm{indices=names}" + chooseXf, "", "");