This commit is contained in:
Ye Wang 2020-04-06 11:30:21 -07:00 committed by GitHub
parent 0dcc6035b1
commit 4ebad8805b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 16 deletions

View file

@ -450,7 +450,7 @@
{
"component": {
"git": {
"commitHash": "f5f481b1ddf9e55810af437a043465b8917ea29e",
"commitHash": "9dfa77ad5c59abd07b77a4c463315ef8112daefc",
"repositoryUrl": "https://github.com/microsoft/FeaturizersLibrary.git"
},
"type": "git"

@ -1 +1 @@
Subproject commit f5f481b1ddf9e55810af437a043465b8917ea29e
Subproject commit 9dfa77ad5c59abd07b77a4c463315ef8112daefc

View file

@ -26,13 +26,8 @@ std::vector<uint8_t> GetStream(EstimatorT& estimator, const std::vector<std::vec
} // namespace
TEST(FeaturizersTests, ShortGrainDropperTransformer_Has_CV) {
//parameter setting
std::uint8_t windowSize = 0;
std::vector<std::uint8_t> lags = NS::TestHelpers::make_vector<std::uint8_t>(static_cast<std::uint8_t>(0), static_cast<std::uint8_t>(0));
std::uint8_t maxHorizon = 1;
nonstd::optional<std::uint8_t> cv = static_cast<std::uint8_t>(1);
EstimatorT estimator(NS::CreateTestAnnotationMapsPtr(1), 0, windowSize, lags, maxHorizon, cv);
EstimatorT estimator(NS::CreateTestAnnotationMapsPtr(1), 0, 4);
std::vector<std::vector<std::vector<std::string>>> trainingBatches = NS::TestHelpers::make_vector<std::vector<std::vector<std::string>>>(
NS::TestHelpers::make_vector<std::vector<std::string>>(
@ -59,19 +54,14 @@ TEST(FeaturizersTests, ShortGrainDropperTransformer_Has_CV) {
OpTester test("ShortGrainDropperTransformer", 1, onnxruntime::kMSFeaturizersDomain);
test.AddInput<uint8_t>("State", {dim}, stream);
test.AddInput<std::string>("Input", {6, 2}, {"a", "b", "a", "c", "a", "d", "a", "e", "a", "f", "a", "g"});
test.AddOutput<bool>("Output", {6}, {false, true, true, true, true, false});
test.AddOutput<bool>("Output", {6}, {false, false, true, true, true, true});
test.Run();
}
TEST(FeaturizersTests, ShortGrainDropperTransformer_No_CV) {
//parameter setting
std::uint8_t windowSize = 1;
std::vector<std::uint8_t> lags = NS::TestHelpers::make_vector<std::uint8_t>(static_cast<std::uint8_t>(0), static_cast<std::uint8_t>(1));
std::uint8_t maxHorizon = 1;
nonstd::optional<std::uint8_t> cv = nonstd::optional<std::uint8_t>();
EstimatorT estimator(NS::CreateTestAnnotationMapsPtr(1), 0, windowSize, lags, maxHorizon, cv);
EstimatorT estimator(NS::CreateTestAnnotationMapsPtr(1), 0, 3);
std::vector<std::vector<std::vector<std::string>>> trainingBatches = NS::TestHelpers::make_vector<std::vector<std::vector<std::string>>>(
NS::TestHelpers::make_vector<std::vector<std::string>>(
@ -98,7 +88,7 @@ TEST(FeaturizersTests, ShortGrainDropperTransformer_No_CV) {
OpTester test("ShortGrainDropperTransformer", 1, onnxruntime::kMSFeaturizersDomain);
test.AddInput<uint8_t>("State", {dim}, stream);
test.AddInput<std::string>("Input", {6, 2}, {"a", "b", "a", "c", "a", "d", "a", "e", "a", "f", "a", "g"});
test.AddOutput<bool>("Output", {6}, {false, false, true, true, true, false});
test.AddOutput<bool>("Output", {6}, {false, false, false, true, true, true});
test.Run();
}