Skip to content

Commit

Permalink
fixing output metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mellistibco committed Mar 14, 2019
1 parent 0333920 commit f534fb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions activity/inference/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
ovResult = "result"
)

var activityMd = activity.ToMetadata(&Input{})
var activityMd = activity.ToMetadata(&Input{}, &Output{})

func init() {
activity.Register(&Activity{}, New)
Expand Down Expand Up @@ -65,7 +65,7 @@ func (a *Activity) Eval(context activity.Context) (done bool, err error) {
fw := context.GetInput(ivFramework).(string)

tfFramework := framework.Get(fw)
fmt.Println(tfFramework.FrameworkTyp())
log.Debugf("Using Framework %s", tfFramework.FrameworkTyp())
if tfFramework == nil {
log.Errorf("%s framework not registered", fw)

Expand Down Expand Up @@ -133,6 +133,7 @@ func (a *Activity) Eval(context activity.Context) (done bool, err error) {
for i := 0; i < len(classes); i++ {
out[classes[i]] = scores[i]
}

context.SetOutput(ovResult, out)
} else {
context.SetOutput(ovResult, output)
Expand Down

0 comments on commit f534fb0

Please sign in to comment.