Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
worker should return an inference value and forecast value (#6)
Browse files Browse the repository at this point in the history
* worker should return an inference value and forecast value

Signed-off-by: Derek Anderson <[email protected]>

* mimick the shape we discussed in slack

Signed-off-by: Derek Anderson <[email protected]>

---------

Signed-off-by: Derek Anderson <[email protected]>
  • Loading branch information
dmikey authored Apr 25, 2024
1 parent e286a03 commit 7d6f4b3
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,23 @@
import random
import json

# An inference example as a random number.
random_number = random.randint(1, 100)

# Create Dictionary
# Create Dictionary
value = {
"value": str(random_number)
"infererValue": str(random.randint(1, 100)),
"forecasterValues": [
{
"node":"allo1inf1",
"value":str(random.randint(1, 100))
},
{
"node":"allo1inf2",
"value":str(random.randint(1, 100))
},
{
"node":"allo1inf1111",
"value":str(random.randint(1, 100))
}
]
}

print(json.dumps(value))

0 comments on commit 7d6f4b3

Please sign in to comment.