Skip to content

Commit a7390e5

Browse files
committed
fix nimparser unittests
Signed-off-by: Varun Ramachandra Sekar <vsekar@nvidia.com>
1 parent be89b19 commit a7390e5

6 files changed

Lines changed: 23 additions & 7 deletions

File tree

internal/nimparser/nimparser_suite_test.go renamed to internal/nimparser/v1/nimparser_suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package nimparser_test
17+
package v1_test
1818

1919
import (
2020
"testing"
@@ -23,7 +23,7 @@ import (
2323
. "github.com/onsi/gomega"
2424
)
2525

26-
func TestRender(t *testing.T) {
26+
func TestNIMParser(t *testing.T) {
2727
RegisterFailHandler(Fail)
2828
RunSpecs(t, "Model Manifest Parser Test Suite")
2929
}

internal/nimparser/v1/nimparser_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var _ = Describe("NIMParser", func() {
3232
Context("ParseModelManifest", func() {
3333
It("should parse a model profile for trtllm engine files correctly", func() {
3434

35-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
35+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
3636
nimparser := NIMParser{}
3737
config, err := nimparser.ParseModelManifest(filePath)
3838
Expect(err).NotTo(HaveOccurred())
@@ -49,7 +49,7 @@ var _ = Describe("NIMParser", func() {
4949
})
5050
It("should parse a model profile for vllm engine files correctly", func() {
5151

52-
filePath := filepath.Join("testdata", "manifest_vllm.yaml")
52+
filePath := filepath.Join("testdata", "manifest_vllm_v1.yaml")
5353
nimparser := NIMParser{}
5454
config, err := nimparser.ParseModelManifest(filePath)
5555
Expect(err).NotTo(HaveOccurred())
@@ -83,7 +83,7 @@ var _ = Describe("NIMParser", func() {
8383
Expect(profile.ContainerURL).To(Equal("nvcr.io/nim/meta/llama3-70b-instruct:1.0.0"))
8484
})
8585
It("should match model profiles with valid parameters", func() {
86-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
86+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
8787
nimparser := NIMParser{}
8888
config, err := nimparser.ParseModelManifest(filePath)
8989
Expect(err).NotTo(HaveOccurred())
@@ -112,7 +112,7 @@ var _ = Describe("NIMParser", func() {
112112
Expect(matchedProfiles).To(HaveLen(1))
113113
})
114114
It("should not match model profiles with invalid parameters", func() {
115-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
115+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
116116
nimparser := NIMParser{}
117117
config, err := nimparser.ParseModelManifest(filePath)
118118
Expect(err).NotTo(HaveOccurred())
@@ -133,7 +133,7 @@ var _ = Describe("NIMParser", func() {
133133
Expect(matchedProfiles).To(BeEmpty())
134134
})
135135
It("should match model profiles using automatically discovered GPUs", func() {
136-
filePath := filepath.Join("testdata", "manifest_trtllm.yaml")
136+
filePath := filepath.Join("testdata", "manifest_trtllm_v1.yaml")
137137
nimparser := NIMParser{}
138138
config, err := nimparser.ParseModelManifest(filePath)
139139
Expect(err).NotTo(HaveOccurred())
File renamed without changes.
File renamed without changes.

internal/nimparser/testdata/manifest_trtllm.yaml renamed to internal/nimparser/v1/testdata/manifest_trtllm_v1.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@
1111
profile: throughput
1212
tp: '8'
1313
container_url: nvcr.io/nim/meta/llama3-70b-instruct:1.0.0
14+
workspace: !workspace
15+
components:
16+
- dst: trtllm_engine
17+
src:
18+
files:
19+
- !name 'LICENSE.txt'
20+
- !name 'checksums.blake3'
21+
- !name 'config.json'

internal/nimparser/testdata/manifest_vllm.yaml renamed to internal/nimparser/v1/testdata/manifest_vllm_v1.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@
88
precision: fp16
99
tp: '8'
1010
container_url: nvcr.io/nim/meta/llama3-70b-instruct:1.0.0
11+
workspace: !workspace
12+
components:
13+
- dst: ''
14+
src:
15+
files:
16+
- !name 'README.md'
17+
- !name 'checksums.blake3'
18+
- !name 'config.json'

0 commit comments

Comments
 (0)