Skip to content

[FaceAPI] Add detection model parameter#6522

Merged
shahabhijeet merged 1 commit intoAzure:masterfrom
TFR258:threis/detection_model_02
Jun 24, 2019
Merged

[FaceAPI] Add detection model parameter#6522
shahabhijeet merged 1 commit intoAzure:masterfrom
TFR258:threis/detection_model_02

Conversation

@TFR258
Copy link
Contributor

@TFR258 TFR258 commented Jun 10, 2019

Auto-regenerated the Face-API SDK from the latest swagger.

All tests run green. However, since the project restructure, they are only running green when ran by sub-section. Running them all will make them fail. I am not sure why this is

@TFR258
Copy link
Contributor Author

TFR258 commented Jun 10, 2019

@lebronJ =)

@lebronJ
Copy link
Contributor

lebronJ commented Jun 10, 2019

  1. Increment SDK version in Microsoft.Azure.CognitiveServices.Vision.Face.csproj and Face/Properties/AssemblyInfo.cs
  2. Add release notes in Microsoft.Azure.CognitiveServices.Vision.Face.csproj.

@TFR258
Copy link
Contributor Author

TFR258 commented Jun 10, 2019

It seems like our AssemblyInfo.cs file was deleted here: 4ac320b#diff-249b622914167b32cea7bd2da775f910

Is this expected?

@lebronJ
Copy link
Contributor

lebronJ commented Jun 11, 2019

@dsgouda, @shahabhijeet We met some problems when generating .NET SDKs based on latest swagger file from Azure/azure-rest-api-specs#6214. Seems the folder structure has been adjusted since our last changes, could anyone help figure out the current right way to generate .NET SDK for Face API?

Local error messages when running the generate.ps1:

Resolve-Path : Cannot find path 'C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\SDKs'
because it does not exist.
At C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule\AutoRestCodeG
enerationModule.psm1:506 char:38

  • ... dkRepoDirectory = Resolve-Path -Path "$localSdkRepoDirectory..\SDKs"
  •                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (C:\Users\siqliu...ionModules\SDKs:String) [Resolve-Path], ItemNotFoundE
      xception
    • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.ResolvePathCommand

Installing AutoRest version: latest

autorest@2.0.4283 preinstall E:\nodejs\node_modules.staging\autorest-3b439699
node ./preinstall-check

E:\nodejs\autorest -> E:\nodejs\node_modules\autorest\dist\app.js
E:\nodejs
`-- autorest@2.0.4283

AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule
AutoRest code generation utility [version: 2.0.4283; node: v7.10.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
Failure:

Write-ErrorLog : Error: Unable to start AutoRest Core from
C:\Users\siqliu.autorest@microsoft.azure_autorest-core@2.0.4382\node_modules@microsoft.azure\autorest-core
Error: Unable to start AutoRest Core from
C:\Users\siqliu.autorest@microsoft.azure_autorest-core@2.0.4382\node_modules@microsoft.azure\autorest-core
at main (E:\nvm\v7.10.0\node_modules\autorest\dist\app.js:232:19)
C:\Users\siqliu.autorest@microsoft.azure_autorest-core@2.0.4382\node_modules@microsoft.azure\autorest-core\dist\app.
js:33
autorest_core_1.Shutdown();
^
ReferenceError: autorest_core_1 is not defined
at process.on (C:\Users\siqliu.autorest@microsoft.azure_autorest-core@2.0.4382\node_modules@microsoft.azure\auto
rest-core\dist\app.js:33:5)
at emitOne (events.js:101:20)
at process.emit (events.js:191:7)
at process.emit (/node_modules/source-map-support/source-map-support.js:439:21)
fs.js:550
return binding.close(fd);
^
Error: EBADF: bad file descriptor, close
at Object.fs.closeSync (fs.js:550:18)
at StaticVolumeFile.shutdown (E:\nvm\v7.10.0\node_modules\autorest\dist\static-loader.js:352:10)
at StaticFilesystem.shutdown (E:\nvm\v7.10.0\node_modules\autorest\dist\static-loader.js:406:17)
at process.exit.n [as exit] (E:\nvm\v7.10.0\node_modules\autorest\dist\static-loader.js:169:11)
at printErrorAndExit (/node_modules/source-map-support/source-map-support.js:423:11)
at process.emit (/node_modules/source-map-support/source-map-support.js:435:16)
at process._fatalException (bootstrap_node.js:304:26)
At C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule\AutoRestCodeG
enerationModule.psm1:95 char:5

  • Write-ErrorLog $stderr
    
  • ~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-ErrorLog

Write-ErrorLog : System.Management.Automation.RuntimeException: Cannot convert value to type System.String. --->
System.Management.Automation.PSInvalidCastException: Cannot convert value to type System.String. --->
System.InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_ProcessName()
at System.Diagnostics.Process.ToString()
at System.Management.Automation.PSObject.ToString(ExecutionContext context, Object obj, String separator, String
format, IFormatProvider formatProvider, Boolean recurse, Boolean unravelEnumeratorOnRecurse)
--- End of inner exception stack trace ---
at System.Management.Automation.PSObject.ToStringParser(ExecutionContext context, Object obj)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at System.Management.Automation.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) --- End of inner exception stack trace --- at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0)
at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object
inputToProcess)
at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
At C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule\AutoRestCodeG
enerationModule.psm1:185 char:9

  •     Write-ErrorLog $_.Exception.ToString()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-ErrorLog

Write-ErrorLog : AutoRest code generation for
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/readme.md
failed. Please try again
At C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule\AutoRestCodeG
enerationModule.psm1:543 char:9

  •     Write-ErrorLog $_.ToString()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-ErrorLog

Write-ErrorLog : AutoRest code generation for
https://github.com/Azure/azure-rest-api-specs/blob/master/specification/cognitiveservices/data-plane/Face/readme.md
failed. Please try again
At C:\Users\siqliu\Documents\WindowsPowerShell\Modules\CodeGenerationModules\AutoRestCodeGenerationModule\AutoRestCodeG
enerationModule.psm1:544 char:9

  •     Write-ErrorLog $_.ToString()
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-ErrorLog

@lebronJ
Copy link
Contributor

lebronJ commented Jun 11, 2019

Moreover, will .NET SDK be generated by auto PR from Swagger PR, or be generated by ourselves locally by the generate.ps1?

I believe all generated SDKs in this PR are generated by local auto-rest commands, not through generate.ps1.

@dsgouda
Copy link
Contributor

dsgouda commented Jun 11, 2019

@chidozieononiwu could you take a look since you worked on migrating the directory structure.
@shahabhijeet PTAL, let me know if you need help with the cmdlet (I think its a matter of setting the right path using SdkGenerationDirectory param)

@chidozieononiwu
Copy link
Member

It seems like our AssemblyInfo.cs file was deleted here: 4ac320b#diff-249b622914167b32cea7bd2da775f910
Is this expected?

Yes, Assembly Information is now generated from the csproj file.

@TFR258 TFR258 force-pushed the threis/detection_model_02 branch from 545ccef to dc09146 Compare June 18, 2019 06:59
@TFR258 TFR258 force-pushed the threis/detection_model_02 branch from dc09146 to bfe182c Compare June 18, 2019 07:20
@TFR258
Copy link
Contributor Author

TFR258 commented Jun 19, 2019

@dsgouda @chidozieononiwu this PR is ready for a merge =)

@TFR258
Copy link
Contributor Author

TFR258 commented Jun 21, 2019

@dsgouda, @chidozieononiwu , @shahabhijeet , Can you please help review nad merge this PR?
Thanks,
Tom

@shahabhijeet shahabhijeet merged commit e19ab03 into Azure:master Jun 24, 2019
<AssemblyTitle>Microsoft Cognitive Services Face SDK</AssemblyTitle>
<Description>This client library provides access to the Microsoft Cognitive Services Face APIs.</Description>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.5.0-preview</VersionPrefix>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be set to 2.5.0 without the "-preview" as that gets set when producing the build. See https://github.com/Azure/azure-sdk-for-net/blob/master/Documentation/Versioning.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants