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

Fix C# phi-2 test #1050

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix C# phi-2 test #1050

wants to merge 3 commits into from

Conversation

skyline75489
Copy link
Contributor

@skyline75489 skyline75489 commented Nov 8, 2024

The C# phi-2 test was skipped due to the wrong model path. This PR intends to fix it.

@skyline75489 skyline75489 marked this pull request as ready for review November 15, 2024 01:45
@skyline75489 skyline75489 requested a review from a team as a code owner November 15, 2024 01:45
@skyline75489
Copy link
Contributor Author

Note that there's still resource leaks in the C# tests. Will try to fix it later.

using Xunit;
using Xunit.Abstractions;

namespace Microsoft.ML.OnnxRuntimeGenAI.Tests
{
public class TestsFixture : IDisposable
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test-case level fixture doesn't work. Because after OgaShutdown is called, it can't recover and the entire test crashes.

@@ -82,7 +82,7 @@ jobs:
run: |
export ORTGENAI_LOG_ORT_LIB=1
cd test/csharp
dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/cpu/osx-arm64"
dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/cpu/osx-arm64" --verbosity normal
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This produces much better results in terms of test cases.

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.

1 participant