-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use v1 schema for stats in hello world apps
- Loading branch information
1 parent
1f31e32
commit 2da4af5
Showing
3 changed files
with
45 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
import nextmv | ||
|
||
# Read from stdin. | ||
# Read the input from stdin. | ||
input = nextmv.load_local() | ||
name = input.data["name"] | ||
|
||
##### Insert model here | ||
|
||
# Print logs that render in the run view in Nextmv Console | ||
nextmv.log(f"Hello, {name}") | ||
# Print logs that render in the run view in Nextmv Console. | ||
message = f"Hello, {name}" | ||
nextmv.log(message) | ||
|
||
# Write output and statistics. | ||
output = nextmv.Output(solution=None, statistics={"message": f"Hello, {name}"}) | ||
output = nextmv.Output( | ||
solution=None, | ||
statistics=nextmv.Statistics( | ||
result=nextmv.ResultStatistics( | ||
value=1.23, | ||
custom={"message": message}, | ||
), | ||
), | ||
) | ||
nextmv.write_local(output) |