Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardopinosio committed Mar 21, 2024
1 parent b7165b3 commit 588384d
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions cmd/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"log"
"os"
"path"
"testing"
Expand Down Expand Up @@ -65,25 +64,25 @@ func TestTextClassificationCli(t *testing.T) {
}
baseArgs := os.Args[0:1]

testModel := path.Join("../models", "KnightsAnalytics_distilbert-base-uncased-finetuned-sst-2-english")
testModel := path.Join("build", "models", "KnightsAnalytics_distilbert-base-uncased-finetuned-sst-2-english")

fmt.Println("TESTMODEL", testModel)
fmt.Println(os.Getwd())

entries, err := os.ReadDir("/build/models")
if err != nil {
log.Fatal(err)
}
fmt.Println("LEN", len(entries))
// entries, err := os.ReadDir("/build/models")
// if err != nil {
// log.Fatal(err)
// }
// fmt.Println("LEN", len(entries))

for _, e := range entries {
fmt.Println(e.Name())
}
// for _, e := range entries {
// fmt.Println(e.Name())
// }

// write the test data and test recursive reads and processing from folder
testDataDir := path.Join(os.TempDir(), "hugoTestData")
recurseDir := path.Join(testDataDir, "cliRecurseTest")
err = os.MkdirAll(recurseDir, os.ModePerm)
err := os.MkdirAll(recurseDir, os.ModePerm)
check(t, err)
err = os.WriteFile(path.Join(testDataDir, "test-0.jsonl"), textClassificationData, os.ModePerm)
check(t, err)
Expand Down

0 comments on commit 588384d

Please sign in to comment.