mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Merge pull request #235 from PR0M3TH3AN/perf/scheduler-verify-memory-step-parallel-9310367124613202891
⚡ Parallelize artifact checks in scheduler verification
This commit is contained in:
1 file changed
+2
-8
@@ -295,14 +295,8 @@ async function artifactExistsSince(filePath, sinceMs) {
|
||||
|
||||
async function verifyMemoryStep({ name, markers, artifacts, outputText, sinceMs }) {
|
||||
const markerMatched = markers.some((marker) => outputText.includes(marker));
|
||||
let artifactMatched = false;
|
||||
|
||||
for (const artifact of artifacts) {
|
||||
if (await artifactExistsSince(artifact, sinceMs)) {
|
||||
artifactMatched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
const artifactResults = await Promise.all(artifacts.map((artifact) => artifactExistsSince(artifact, sinceMs)));
|
||||
const artifactMatched = artifactResults.some(Boolean);
|
||||
|
||||
return {
|
||||
name,
|
||||
|
||||
Reference in new issue
Block a user