Skip to content

Commit

Permalink
Remove unnecessary Finalize function
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-grella committed Oct 30, 2023
1 parent 3c0cb00 commit 098ac25
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ func run() error {
if err != nil {
return err
}
defer tasks.Finalize(m)

logMetrics()

Expand Down
1 change: 0 additions & 1 deletion examples/abstractivequestionasnwering/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

opts := textgeneration.DefaultOptions()

Expand Down
1 change: 0 additions & 1 deletion examples/languagemodeling/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

fn := func(text string) error {
result, err := m.Predict(context.Background(), text, languagemodeling.Parameters{K: 10})
Expand Down
1 change: 0 additions & 1 deletion examples/questionanswering/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

opts := &questionanswering.Options{}

Expand Down
1 change: 0 additions & 1 deletion examples/relationextraction/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

opts := textgeneration.DefaultOptions()

Expand Down
1 change: 0 additions & 1 deletion examples/textclassification/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

fn := func(text string) error {
start := time.Now()
Expand Down
1 change: 0 additions & 1 deletion examples/textencoding/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

fn := func(text string) error {
result, err := m.Encode(context.Background(), text, int(bert.MeanPooling))
Expand Down
1 change: 0 additions & 1 deletion examples/textgeneration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

log.Debug().Msgf("Loaded model %q in %v", modelName, time.Since(start))

Expand Down
1 change: 0 additions & 1 deletion examples/tokenclassification/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

params := tokenclassification.Parameters{
AggregationStrategy: tokenclassification.AggregationStrategySimple,
Expand Down
1 change: 0 additions & 1 deletion examples/zeroshotclassification/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func main() {
if err != nil {
log.Fatal().Err(err).Send()
}
defer tasks.Finalize(m)

params := zeroshotclassifier.Parameters{
CandidateLabels: strings.Split(possibleClasses, ","),
Expand Down
23 changes: 0 additions & 23 deletions pkg/tasks/finalizer.go

This file was deleted.

0 comments on commit 098ac25

Please sign in to comment.