Skip to content

Commit

Permalink
add windows build in CI workflow (#504) (#574)
Browse files Browse the repository at this point in the history
Signed-off-by: Yaliang Wu <ylwu@amazon.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <114637679+b4sjoo@users.noreply.github.com>

Signed-off-by: Yaliang Wu <ylwu@amazon.com>
Signed-off-by: Sicheng Song <114637679+b4sjoo@users.noreply.github.com>
Co-authored-by: Yaliang Wu <ylwu@amazon.com>
  • Loading branch information
b4sjoo and ylwu-amzn authored Nov 24, 2022
1 parent d8aea81 commit 0aded89
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/CI-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,30 @@ jobs:
with:
flags: ml-commons
token: ${{ secrets.CODECOV_TOKEN }}

Build-ml-windows:
strategy:
matrix:
java: [11, 17]
name: Build and Test MLCommons Plugin on Windows
runs-on: windows-latest

steps:
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}

# ml-commons
- name: Checkout MLCommons
uses: actions/checkout@v2

- name: Build and Run Tests
run: |
./gradlew.bat build
- name: Publish to Maven Local
run: |
./gradlew publishToMavenLocal
# - name: Multi Nodes Integration Testing
# run: |
# ./gradlew integTest -PnumNodes=3
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import java.util.concurrent.atomic.AtomicReference;

import org.junit.Before;
import org.junit.Ignore;
import org.opensearch.action.search.SearchResponse;
import org.opensearch.ml.action.MLCommonsIntegTestCase;
import org.opensearch.ml.action.profile.MLProfileNodeResponse;
Expand All @@ -38,6 +39,7 @@ public void setUp() throws Exception {
super.setUp();
}

@Ignore
public void testCustomModelWorkflow() throws InterruptedException {
FunctionName functionName = FunctionName.TEXT_EMBEDDING;
String modelName = "all-MiniLM-L6-v2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Map;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import org.opensearch.ml.common.MLTaskState;
Expand All @@ -30,7 +31,8 @@ public void setup() {
uploadInput = createUploadModelInput();
}

public void testUnloadModelAPI_Success() throws IOException, InterruptedException {
@Ignore
public void testCustomModelWorkflow() throws IOException, InterruptedException {
// upload model
String taskId = uploadModel(TestHelper.toJsonString(uploadInput));
waitForTask(taskId, MLTaskState.COMPLETED);
Expand All @@ -49,6 +51,7 @@ public void testUnloadModelAPI_Success() throws IOException, InterruptedExceptio
assertEquals(MLTaskState.COMPLETED.name(), response.get(STATE_FIELD));
});
getModelProfile(modelId, verifyTextEmbeddingModelLoaded());
// unload model
Map<String, Object> result = unloadModel(modelId);
for (Map.Entry<String, Object> entry : result.entrySet()) {
Map stats = (Map) ((Map) entry.getValue()).get("stats");
Expand Down

0 comments on commit 0aded89

Please sign in to comment.