-
Notifications
You must be signed in to change notification settings - Fork 1.9k
API Compat tool in ML.NET #3623
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
Changes from 1 commit
449c8df
f0ebe31
4e93cf3
1ba081c
c113ef3
455ab08
b9d2fac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,29 @@ | |
|
||
</Target> | ||
|
||
<!-- API Compat --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider moving these to a seperate targets file if that is a convention you'd like to follow in this repo. #Pending There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we only have one for the src repo. But let me know if there is a better way. In reply to: 279938766 [](ancestors = 279938766) |
||
<PropertyGroup Condition="'$(RunApiCompat)' == 'true'"> | ||
<!-- resolve contract for APICompat as part of resolve references --> | ||
<ResolveReferencesDependsOn> | ||
$(ResolveReferencesDependsOn); | ||
ResolveMatchingContract | ||
</ResolveReferencesDependsOn> | ||
|
||
<StabelApiProject>$(RepoRoot)tools-local\Microsoft.ML.StableApi\Microsoft.ML.StableApi.csproj</StabelApiProject> | ||
artidoro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(RunApiCompat)' == 'true'"> | ||
<PackageReference Include="Microsoft.DotNet.ApiCompat" | ||
Version="$(MicrosoftDotNetApiCompatPackageVersion)" | ||
PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<Target Name="ResolveMatchingContract"> | ||
<MSBuild Projects="$(StabelApiProject)" | ||
Targets="GetContract" | ||
Properties="ContractName=$(AssemblyName);TargetFramework=$(TargetFramework)"> | ||
<Output TaskParameter="TargetOutputs" ItemName="ResolvedMatchingContract"/> | ||
</MSBuild> | ||
</Target> | ||
|
||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This project will actually build a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried renaming, but that did not work (it gave an error saying that project.assets.json was not generated. What I did was adding:
to the .csproj file. What is the correct way to overwrite it? In reply to: 280105436 [](ancestors = 280105436) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think that is fine. |
||
|
||
<PropertyGroup> | ||
<!-- needs to contain all frameworks which src projects wish to restore --> | ||
<TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.ML" Version="1.0.0-preview-27625-16"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (nit) you can use the latest 1.0.0-preview build: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will update to the new build and change to 1.0.0 as soon as it is available. In reply to: 279941849 [](ancestors = 279941849) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's available on myget now. You should be able to use |
||
<PackageReference Include="Microsoft.ML.DataView" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.CpuMath" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.FastTree" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.LightGbm" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.0.0-preview-27625-16"/> | ||
<PackageReference Include="Microsoft.ML.Mkl.Redist" Version="1.0.0-preview-27625-16"/> | ||
</ItemGroup> | ||
|
||
<!-- The purpose of this target is to return a path from a referenced | ||
package / project --> | ||
<Target Name="GetContract" | ||
DependsOnTargets="ResolveReferences" | ||
Returns="@(_contractReferencePath)"> | ||
<Error Condition="'$(ContractName)' == ''" Text="ContractName must be specified" /> | ||
<ItemGroup> | ||
<_contractReferencePath Include="@(ReferencePath)" Condition="'%(FileName)' == '$(ContractName)'" /> | ||
</ItemGroup> | ||
<Error Condition="'$(ContractName)' == ''" Text="Could not locate $(ContractName)" /> | ||
artidoro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</Target> | ||
|
||
</Project> |
Uh oh!
There was an error while loading. Please reload this page.