Skip to content

Commit 4c432d6

Browse files
Merge pull request #86 from nextmv-io/feature/eng-5950-investigate-weird-behavior-with-tracked-runs-and-null
Make adjustments to tracked run
2 parents d7603cc + 994656e commit 4c432d6

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

nextmv/nextmv/cloud/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ def track_run(self, tracked_run: TrackedRun) -> str:
14341434

14351435
upload_input = tracked_run.input
14361436
if isinstance(tracked_run.input, Input):
1437-
upload_input = tracked_run.input.to_dict()
1437+
upload_input = tracked_run.input.data
14381438

14391439
self.upload_large_input(input=upload_input, upload_url=url_input)
14401440

nextmv/nextmv/output.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ class Statistics(BaseModel):
163163
class OutputFormat(str, Enum):
164164
"""Format of an `Input`."""
165165

166-
JSON = "JSON"
166+
JSON = "json"
167167
"""JSON format, utf-8 encoded."""
168-
CSV_ARCHIVE = "CSV_ARCHIVE"
168+
CSV_ARCHIVE = "csv-archive"
169169
"""CSV archive format: multiple CSV files."""
170170

171171

@@ -334,11 +334,10 @@ def to_dict(self) -> dict[str, any]:
334334
"""
335335

336336
output_dict = {
337-
"options": self.options.to_dict() if self.options is not None else None,
338-
"output_format": self.output_format,
339-
"solution": self.solution,
340-
"statistics": self.statistics.to_dict() if self.statistics is not None else None,
341-
"assets": [asset.to_dict() for asset in self.assets] if self.assets is not None else None,
337+
"options": self.options.to_dict() if self.options is not None else {},
338+
"solution": self.solution if self.solution is not None else {},
339+
"statistics": self.statistics.to_dict() if self.statistics is not None else {},
340+
"assets": [asset.to_dict() for asset in self.assets] if self.assets is not None else [],
342341
}
343342

344343
if self.output_format == OutputFormat.CSV_ARCHIVE:

0 commit comments

Comments
 (0)