MCPcopy Create free account
hub / github.com/NVIDIA/nvcf / Progress

Class Progress

examples/task-samples/task-byoo-sample/main.py:71–97  ·  view source on GitHub ↗

Schema of the progress file. :param taskId: UUID of task, passed from env variables. :param percentComplete: an int value between 0 and 100 to demonstrate percent complete. :param name: name of result folder/artifact to upload to NGC :param lastUpdatedAt: timestamp in RFC 3339

Source from the content-addressed store, hash-verified

69
70@dataclass
71class Progress:
72 """
73 Schema of the progress file.
74
75 :param taskId: UUID of task, passed from env variables.
76 :param percentComplete: an int value between 0 and 100 to demonstrate percent complete.
77 :param name: name of result folder/artifact to upload to NGC
78 :param lastUpdatedAt: timestamp in RFC 3339 Nano format.
79 :param metadata: a dict of additional data to include
80 """
81
82 def __init__(
83 self,
84 taskId: str,
85 percentComplete: int,
86 name: str,
87 lastUpdatedAt: str,
88 metadata: dict,
89 ):
90 self.taskId = taskId
91 self.percentComplete = percentComplete
92 self.name = name
93 self.lastUpdatedAt = lastUpdatedAt
94 self.metadata = metadata
95
96 def output_to_json(self):
97 return json.dumps(self.__dict__)
98
99
100def parse_progress_file(progress_file_path):

Callers 3

parse_progress_fileFunction · 0.70
heartbeatFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected