Skip to content

Conversation

feiyun0112
Copy link
Contributor

fix #7483

@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 05:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames all occurrences of “Casual” to the correct “Causal” in class names, pipeline types, tests, samples, and utility methods.

  • Rename model and pipeline types (e.g., Phi3ForCasualLM → Phi3ForCausalLM)
  • Update related test and sample references
  • Rename attention-mask helpers (e.g., MakeCasualMask → MakeCausalMask)

Reviewed Changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Microsoft.ML.GenAI.Phi/Phi3/Phi3ForCausalLM.cs Renamed class and factory methods to “Causal”
src/Microsoft.ML.GenAI.Phi/Phi2/Phi2ForCausalLM.cs Renamed class and factory methods to “Causal”
src/Microsoft.ML.GenAI.Core/Utility/AttentionMaskConverter.cs Renamed casual→causal flags and mask builders
test/**/*.cs Updated tests to use new Causal classes
docs//*.cs, docs//*.md Updated samples and docs to reference “Causal”
test/Microsoft.ML.GenAI.Core.Tests/Microsoft.ML.GenAI.Core.Tests.csproj Updated removed test filename to Causal...
Comments suppressed due to low confidence (1)

src/Microsoft.ML.GenAI.Phi/Phi3/Phi3ForCausalLM.cs:21

  • Renaming public model classes (e.g., Phi3ForCasualLM → Phi3ForCausalLM) is a breaking change. Consider providing a deprecated alias or marking the old class as [Obsolete] to help downstream consumers migrate smoothly.
public class Phi3ForCausalLM : nn.Module<CausalLMModelInput, CausalLMModelOutput> 
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 45.71429% with 19 lines in your changes missing coverage. Please review.

Project coverage is 68.98%. Comparing base (f861125) to head (715eb9d).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...ft.ML.GenAI.Core/Utility/AttentionMaskConverter.cs 0.00% 10 Missing ⚠️
src/Microsoft.ML.GenAI.Phi/Module/Phi2Model.cs 0.00% 4 Missing ⚠️
src/Microsoft.ML.GenAI.Phi/Phi3/Phi3ForCausalLM.cs 25.00% 3 Missing ⚠️
...ore/Trainer/CausalLMSupervisedFineTuningTrainer.cs 0.00% 1 Missing ⚠️
src/Microsoft.ML.GenAI.Phi/Phi2/Phi2ForCausalLM.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@ ## main #7484 +/- ## ========================================== - Coverage 68.99% 68.98% -0.01%  ========================================== Files 1482 1482 Lines 273880 273880 Branches 28254 28254 ========================================== - Hits 188968 188949 -19  - Misses 77529 77550 +21  + Partials 7383 7381 -2 
Flag Coverage Δ
Debug 68.98% <45.71%> (-0.01%) ⬇️
production 63.27% <20.83%> (-0.01%) ⬇️
test 89.45% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
....ML.GenAI.Phi/Extension/SemanticKernelExtension.cs 100.00% <ø> (ø)
...c/Microsoft.ML.GenAI.Phi/Phi3/Phi3CausalLMAgent.cs 52.00% <100.00%> (ø)
...rosoft.ML.GenAI.Phi/Phi3/Phi3CausalLMChatClient.cs 0.00% <ø> (ø)
...enAI.Phi/Phi3/Phi3CausalLMChatCompletionService.cs 61.90% <100.00%> (ø)
...enAI.Phi/Phi3/Phi3CausalLMTextGenerationService.cs 35.71% <100.00%> (ø)
...crosoft.ML.GenAI.Core.Tests/CausalLMDatasetTest.cs 100.00% <ø> (ø)
test/Microsoft.ML.GenAI.Phi.Tests/AutoGenTests.cs 100.00% <100.00%> (ø)
test/Microsoft.ML.GenAI.Phi.Tests/Phi2Tests.cs 87.87% <100.00%> (ø)
test/Microsoft.ML.GenAI.Phi.Tests/Phi3Tests.cs 95.18% <100.00%> (ø)
...icrosoft.ML.GenAI.Phi.Tests/SemanticKernelTests.cs 100.00% <100.00%> (ø)
... and 5 more

... and 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@LittleLittleCloud LittleLittleCloud merged commit 71e1280 into dotnet:main Jul 9, 2025
25 checks passed
@feiyun0112 feiyun0112 deleted the issues/7483 branch July 10, 2025 02:21
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants