Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeGen For AzureAttach #4498

Draft
wants to merge 23 commits into
base: master
from

Conversation

@LittleLittleCloud
Copy link
Contributor

LittleLittleCloud commented Nov 22, 2019

Transformer added:

ExtractPixel
NormalizeMapping
ResizeImage
ApplyOnnxModel
Notify that those are transformers that not exist in AutoML

Make some refactor a bit in AzureAttachImageCodeGenerator so that it can expand to support Azure Attach smoothly plus more test friendly(it should be easily updated to AzureAttachCodeGenerator when @Dmitry-A 's code get in)

See IgniteDemoTest for usage

ModelPath = @"C:\Users\xiaoyuz\Desktop\flower_photos_tiny_set_for_unit_tests\CodeGenTest\MLModel.zip",
MlTask = TaskKind.MulticlassClassification,
OutputName = @"CodeGenTest",
OutputBaseDir = @"C:\Users\xiaoyuz\Desktop\flower_photos_tiny_set_for_unit_tests\CodeGenTest",

This comment has been minimized.

Copy link
@justinormont

justinormont Nov 22, 2019

Member

You'll need to fetch the dataset from remote.

CLI_Annotation();
} else if(Target == CSharp.GenerateTarget.ModelBuilder){
MB_Annotation();
}

This comment has been minimized.

Copy link
@justinormont

justinormont Nov 22, 2019

Member

If not difficult, we can cleanup the formatting of the generated file.

internal enum SpecialTransformer
{
ApplyOnnxModel = 0,
ResizeImage =1,

This comment has been minimized.

Copy link
@justinormont

justinormont Nov 22, 2019

Member
Suggested change
ResizeImage =1,
ResizeImage = 1,
@@ -60,8 +68,30 @@ internal static ITransformGenerator GetInstance(PipelineNode node)
result = new ImageLoading(node);
break;
default:
// see if node is one of those Transformer

This comment has been minimized.

Copy link
@justinormont

justinormont Nov 22, 2019

Member
Suggested change
// see if node is one of those Transformer
// See if node is one of those Transformer
this.generationEnvironmentField = value;
}
}
/// <summary>

This comment has been minimized.

Copy link
@justinormont

justinormont Nov 22, 2019

Member

This whole file is missing white space between code blocks.

@LittleLittleCloud LittleLittleCloud requested a review from justinormont Nov 22, 2019
@LittleLittleCloud LittleLittleCloud changed the title CodeGen For AzureAttach Image CodeGen For AzureAttach Nov 22, 2019
Xiaoyun Zhang
@LittleLittleCloud LittleLittleCloud force-pushed the LittleLittleCloud:u/xiaoyun/CodeGenForIgnite branch from 508ffb5 to 71c9bf0 Nov 26, 2019
Xiaoyun Zhang added 2 commits Nov 26, 2019
Xiaoyun Zhang
Xiaoyun Zhang
@codecov

This comment has been minimized.

Copy link

codecov bot commented Nov 26, 2019

Codecov Report

Merging #4498 into master will decrease coverage by 0.02%.
The diff coverage is 61.7%.

@@            Coverage Diff             @@
##           master    #4498      +/-   ##
==========================================
- Coverage    74.9%   74.88%   -0.03%     
==========================================
  Files         908      926      +18     
  Lines      160072   161180    +1108     
  Branches    17222    17296      +74     
==========================================
+ Hits       119903   120695     +792     
- Misses      35359    35673     +314     
- Partials     4810     4812       +2
Flag Coverage Δ
#Debug 74.88% <61.7%> (-0.03%) ⬇️
#production 70.24% <59.19%> (-0.01%) ⬇️
#test 90.29% <100%> (+0.01%) ⬆️
Impacted Files Coverage Δ
...harp/Templates/AzureAttachImageModelOutputClass.cs 100% <100%> (ø)
...zureCodeGenerator/AzureAttachImageCodeGenerator.cs 100% <100%> (ø)
...tor/CodeGenerator/CSharp/Templates/ModelBuilder.cs 100% <100%> (ø)
...r/CodeGenerator/CSharp/Templates/PredictProject.cs 100% <100%> (ø)
...r/CodeGenerator/CSharp/Templates/PredictProgram.cs 100% <100%> (ø)
...r/CSharp/Templates/AzureAttachImageConsumeModel.cs 100% <100%> (ø)
...CodeGenerator/CSharp/Templates/NormalizeMapping.cs 100% <100%> (ø)
.../CodeGenerator/CSharp/Templates/ModelInputClass.cs 100% <100%> (ø)
....ML.CodeGenerator.Tests/TransformGeneratorTests.cs 100% <100%> (ø) ⬆️
...tor/CodeGenerator/CSharp/Templates/ModelProject.cs 100% <100%> (ø)
... and 50 more
Xiaoyun Zhang and others added 5 commits Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.