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

Class Progress

examples/task-samples/multi-node-helm-task-test/container/runner.py:36–59  ·  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

34
35@dataclass
36class Progress:
37 """
38 Schema of the progress file.
39
40 :param taskId: UUID of task, passed from env variables.
41 :param percentComplete: an int value between 0 and 100 to demonstrate percent complete.
42 :param name: name of result folder/artifact to upload to NGC
43 :param lastUpdatedAt: timestamp in RFC 3339 Nano format.
44 :param metadata: a dict of additional data to include
45 """
46 def __init__(self,
47 taskId: str,
48 percentComplete: int,
49 name: str,
50 lastUpdatedAt: str,
51 metadata: dict):
52 self.taskId = taskId
53 self.percentComplete = percentComplete
54 self.name = name
55 self.lastUpdatedAt = lastUpdatedAt
56 self.metadata = metadata
57
58 def output_to_json(self):
59 return json.dumps(self.__dict__)
60
61
62def 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