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

nightly build pipeline #4444

Merged
merged 6 commits into from Nov 9, 2019

Conversation

@frank-dong-ms
Copy link
Member

frank-dong-ms commented Nov 6, 2019

new nightly build pipeline:

  1. add new nightly build pipeline project, disable project build from solution
  2. add NuGet package version updater project
  3. add new Azure nightly build pipeline and template file
  4. TestFrameworkCommon project use conditional reference to source code:
    a. when reference from functional test, use project reference
    b. when reference from nightly build test, use package reference
  5. process of nightly build pipeline:
    a. get latest NuGet package version from public NuGet feed
    b. update version to .props file
    c. build nightly build project
    d. run nightly build tests, which is functional test for now
    e. output test results
  6. a sample test pipeline can be seems here: https://dev.azure.com/dnceng/public/_build?definitionId=644&_a=summary
@frank-dong-ms frank-dong-ms requested a review from dotnet/mlnet-core as a code owner Nov 6, 2019
@codecov

This comment has been minimized.

Copy link

codecov bot commented Nov 6, 2019

Codecov Report

Merging #4444 into master will increase coverage by 0.67%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4444      +/-   ##
==========================================
+ Coverage   74.03%    74.7%   +0.67%     
==========================================
  Files         905      906       +1     
  Lines      159107   159288     +181     
  Branches    17128    17145      +17     
==========================================
+ Hits       117794   119000    +1206     
+ Misses      36545    35477    -1068     
- Partials     4768     4811      +43
Flag Coverage Δ
#Debug 74.7% <ø> (+0.67%) ⬆️
#production 70.06% <ø> (+0.88%) ⬆️
#test 90.12% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...c/Microsoft.ML.FastTree/Utils/ThreadTaskManager.cs 79.48% <0%> (-20.52%) ⬇️
....ML.AutoML/PipelineSuggesters/PipelineSuggester.cs 71.42% <0%> (-8.41%) ⬇️
...rosoft.ML.AutoML/Utils/SweepableParamAttributes.cs 52.1% <0%> (-6.73%) ⬇️
...rosoft.ML.AutoML/ColumnInference/TextFileSample.cs 59.6% <0%> (-5.97%) ⬇️
src/Microsoft.ML.Maml/MAML.cs 24.75% <0%> (-1.46%) ⬇️
...c/Microsoft.ML.SamplesUtils/SamplesDatasetUtils.cs 39.77% <0%> (ø)
...ML.Transforms/Text/StopWordsRemovingTransformer.cs 86.26% <0%> (+0.15%) ⬆️
...soft.ML.Data/DataLoadSave/Text/TextLoaderCursor.cs 85.31% <0%> (+0.2%) ⬆️
src/Microsoft.ML.AutoML/Sweepers/Parameters.cs 83.05% <0%> (+0.84%) ⬆️
...osoft.ML.KMeansClustering/KMeansPlusPlusTrainer.cs 84.64% <0%> (+2.69%) ⬆️
... and 17 more
artifactName: parameters.name(_config_short)
artifactType: container
- ${{ if eq(parameters.buildScript, 'build.cmd') }}:
- powershell: |

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

This step to clean-up test data is not needed if you're not running any steps after running tests... the reason why we have it on CI builds is because we build packages after running tests and we need to cleanup space disk before we can do that to avoid failing because the machine ran out of space. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

I see, thanks for explain, will remove


In reply to: 343775233 [](ancestors = 343775233)

@@ -0,0 +1,116 @@
parameters:
name: ''

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

This file is very similar to the job-template.yml that we already have for CI builds. Would it make sense to instead use that template, and then define variables and steps based on a parameter passed down to the template? I.e: add a parameter called... isNightlyBuild: false (defaults to false)... then when you reference the template from the nightly build you pass that parameter down as true. Then in the template when isNightlyBuild == true you run the build and restore steps differently. That way you only maintain one base template file. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

Yes, I saw what was done for codeCoverage, for nightly build, the logic difference is more as you can see there are 5 steps that is nightly build only, and there are several steps that nightly build don't need. So I use separate template here to keep the logic simple but I don't have strong preference here, let's discuss via a quick call.


In reply to: 343777088 [](ancestors = 343777088)

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 8, 2019

Author Member

Offline discussed with Santiago, will merge these template file into


In reply to: 343828680 [](ancestors = 343828680,343777088)

<PackageReference Include="Microsoft.ML.Parquet" Version="0.17.0-preview-28305-3" />
<PackageReference Include="Microsoft.ML.Recommender" Version="0.17.0-preview-28305-3" />
</ItemGroup>
</Project>

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

Nit: extra line in EOF in all these files. #Resolved

@@ -0,0 +1,14 @@
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="1.5.0-preview-28305-3" />

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

What's the plan for updating these versions? I see only 2 package versions here, should we define a property for them and then use those properties here instead of hard-coding the versions? #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

These versions are only place holder, when running pipeline, the NugetPackageVersionUpdater will update all these out of date version number


In reply to: 343777962 [](ancestors = 343777962)

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

Would it make sense to instead use a placeholder? Rather than a hard-coded version? I think it deserves a comment explaining what happens so that people understand that we update it on the fly. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

We need to restore project first to be able to list latest package versions, so use a placeholder will not work, I will put some comments here incase of confusion


In reply to: 343900725 [](ancestors = 343900725)

<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(ReferenceTypeForTestFramework)'=='NuGet'">
<PackageReference Include="Microsoft.ML" Version="1.5.0-preview-28305-3" />

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

You could use the shared property for the package version here as I suggested on my previous comment. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

same as pervious


In reply to: 343778600 [](ancestors = 343778600)

<ItemGroup Condition="'$(ReferenceTypeForTestFramework)'=='' OR '$(ReferenceTypeForTestFramework)'=='Project'">
<ProjectReference Include="..\..\src\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(ReferenceTypeForTestFramework)'=='NuGet'">

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

Nit: space before and after == #Resolved

@@ -0,0 +1,8 @@
<Project>
<ItemGroup Condition="'$(ReferenceTypeForTestFramework)'=='' OR '$(ReferenceTypeForTestFramework)'=='Project'">

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

Nit: space before and after == #Resolved

- ${{ if eq(parameters.name, 'Ubuntu_x64_NetCoreApp21') }}:
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH](nightlyBuildRunPath):LD_LIBRARY_PATH"
displayName: Set LD_LIBRARY_PATH for Ubuntu to locate Native shared library
- script: parameters.buildScript−(_configuration) -buildArch=${{ parameters.architecture }}

This comment has been minimized.

Copy link
@safern

safern Nov 7, 2019

Member

Please prepend variables with $ to be consistent... (configuration) -> $(configuration)

Also in the rest of this file. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 7, 2019

Author Member

Yes, will do


In reply to: 343901037 [](ancestors = 343901037)

Remove duplicate lines from project file. (#4439)

Image Classification Sample cleanup (#4380)

* Aligned line ending to 85 char limit

* Cleaned up Early Stopping sample

* Added comments to ResnetV2101TransferLearningTrainTestSplit

* Added comments to ResnetV2101TransferLearningEarlyStopping

* Add comments to ImageClassificationDefault sample

* Added comments to LearningRateSchedulingCifarResnetTransferLearning sample

* added '.', formatted output.

* fixed sample after rebase

* fix ealy stopping sample

* fix GetAbsolutePath function for samples.

* remove unnecessary try catch block from samples.

* review comments.

Increment stable API version and add new stable packages to the list. (#4453)

* Increment stable API version and add new stable packages to the list.

* Increment stable API version and add new stable packages to the list.

also update template file

format template file

fix error in template

fix condition in template file

fix template format error

fix template parameter error

fix on template, seems corrupted when copy from github

fix placeholder

fix template error, encoding

fix template

fix in template file set system env

take comments and make adjustment
…to nightly-build-pipeline
- script: ${{ parameters.buildScript }} -$(_configuration) -runtests -coverage=${{ parameters.codeCoverage }}
displayName: Run Tests.
condition: eq(${{ parameters.nightlyBuild }}, false)

This comment has been minimized.

Copy link
@safern

safern Nov 8, 2019

Member

Instead of using runtime conditions, could you use compile time conditions? That way when you're running on nightly build, the UI will only show the "real" steps and when in CI, the "real" CI steps. The way currently is, it will show a bunch of disabled steps, which makes harder to read the logs.

Compile time would be ${{ if eq(parameters.nightlyBuild, 'false') }} #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 8, 2019

Author Member

I see, will do, good suggestions


In reply to: 344278680 [](ancestors = 344278680)

- ${{ if eq(parameters.nightlyBuild, 'true') }}:
- script: $(dotnetPath) restore $(nightlyBuildProjPath)
displayName: Restore nightly build project
- ${{ if eq(parameters.nightlyBuild, 'true') }}:
- script: $(dotnetPath) list $(nightlyBuildProjPath) package --source $(nugetFeed) --outdated > $(versionFilePath)
displayName: List latest package versions
- ${{ if eq(parameters.nightlyBuild, 'true') }}:
- script: $(dotnetPath) run --project $(packageUpdaterProjPath)
displayName: Update package version
- ${{ if eq(parameters.nightlyBuild, 'true') }}:
- script: $(dotnetPath) msbuild -restore $(nightlyBuildProjPath) /p:ReferenceTypeForTestFramework="Nuget" /p:Configuration=$(_configuration) /p:TargetArchitecture=${{ parameters.architecture }}
displayName: Build Nightly Build Project with latest package versions
- ${{ if eq(parameters.nightlyBuild, 'true') }}:
- script: ${{ parameters.buildScript }} -$(_configuration) -runnightlybuildtests
displayName: Run Nightly Build Tests
Comment on lines 53 to 67

This comment has been minimized.

Copy link
@safern

safern Nov 8, 2019

Member

You should only use 1 if for all these lines. An if can have multiple tasks/blocks under it, it is just a matter of indentation.

Same for the false block. #Resolved

This comment has been minimized.

Copy link
@frank-dong-ms

frank-dong-ms Nov 8, 2019

Author Member

I see, will do, thanks


In reply to: 344337822 [](ancestors = 344337822)

@safern
safern approved these changes Nov 8, 2019
@frank-dong-ms frank-dong-ms merged commit 8884161 into dotnet:master Nov 9, 2019
17 of 19 checks passed
17 of 19 checks passed
MachineLearning-CodeCoverage Build #20191108.9 had test failures
Details
MachineLearning-CodeCoverage (Windows_x64 Build_Debug) Windows_x64 Build_Debug was canceled
Details
MachineLearning-CI Build #20191108.9 had test failures
Details
MachineLearning-CI (Centos_x64_NetCoreApp30 Debug_Build) Centos_x64_NetCoreApp30 Debug_Build succeeded
Details
MachineLearning-CI (Centos_x64_NetCoreApp30 Release_Build) Centos_x64_NetCoreApp30 Release_Build succeeded
Details
MachineLearning-CI (MacOS_x64_NetCoreApp21 Debug_Build) MacOS_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (MacOS_x64_NetCoreApp21 Release_Build) MacOS_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Ubuntu_x64_NetCoreApp21 Debug_Build) Ubuntu_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Ubuntu_x64_NetCoreApp21 Release_Build) Ubuntu_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp21 Debug_Build) Windows_x64_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp21 Release_Build) Windows_x64_NetCoreApp21 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp30 Debug_Build) Windows_x64_NetCoreApp30 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetCoreApp30 Release_Build) Windows_x64_NetCoreApp30 Release_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetFx461 Debug_Build) Windows_x64_NetFx461 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x64_NetFx461 Release_Build) Windows_x64_NetFx461 Release_Build succeeded
Details
MachineLearning-CI (Windows_x86_NetCoreApp21 Debug_Build) Windows_x86_NetCoreApp21 Debug_Build succeeded
Details
MachineLearning-CI (Windows_x86_NetCoreApp21 Release_Build) Windows_x86_NetCoreApp21 Release_Build succeeded
Details
WIP Ready for review
Details
license/cla All CLA requirements met.
Details
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.