Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Support Frame Chunking for tasks #77

Open
wants to merge 5 commits into
base: mainline
Choose a base branch
from

Conversation

Ahuge
Copy link
Contributor

@Ahuge Ahuge commented Dec 11, 2024

What was the problem/requirement? (What/Why)

There can be a high overhead for launching AfterEffects (aerender) for each frame and for short renders, this overhead can be more than half of the entire render time for the job.

What was the solution? (How)

This solution uses a clever taskParameterDefinitions range function to implement frame chunking from the OpenJD-Specifications wiki: Search for FrameEndMinusOne

"taskParameterDefinitions": [
                {
                    "name": "FrameChunkStart",
                    "type": "INT",
                    "range": "{{Param.FrameStart}}-{{Param.FrameEnd}}:{{Param.ChunkSize}}"
                },
                {
                    "name": "FrameChunkEnd",
                    "type": "INT",
                    "range": "{{Param.FrameStartPlusChunkSizeMinusOne}}-{{Param.FrameEndMinusOne}}:{{Param.ChunkSize}},{{Param.FrameEnd}}"
                }
            ],
            "combination": "(FrameChunkStart, FrameChunkEnd)"

What is the impact of this change?

A new UI field Frames Per Task in Job-Specific Settings
image

That field now controls the chunk size for each task.
This modifies the JobTemplate parameters with two new "calculated" parameters FrameStartPlusChunkSizeMinusOne and FrameEndMinusOne which are calculated in the submitter and passed as parameters to the template.

How was this change tested?

We ran jobs through the three Comp Submission workflows: "Submit One Comp", "Submit Entire Queue As One Job", "Submit Entire Queue As Separate Jobs".

Did you run the "Job Bundle Output Tests"? If not, why not? If so, paste the test results here.

Was this change documented?

Is this a breaking change?

Yes

Runtime Data

I have some runtime metrics from a naive aerender (1 frame per task) workflow and a chunked aerender workflow:

Naive Submission:

 ==== SUMMARY ====

Session Count: 38
Session Total Duration: 0:16:51.511000
Session Action Count: 203
Session Action Total Duration: 0:15:12.578000
Task Run Count: 51
Task Run Total Duration: 0:14:54.141000 (88.4%)
Non-Task Run Count: 152
Non-Task Run Total Duration: 0:00:18.437000 (1.8%)
Sync Job Attachments Count: 0
Sync Job Attachments Total Duration: 0:00:00 (0.0%)
Env Action Count: 152
Env Action Total Duration: 0:00:18.437000 (1.8%)

Within-session Overhead Duration: 0:01:38.933000 (9.8%)
Within-session Overhead Duration Per Action: 0:00:00.487355

My Chunked Submission:

 ==== SUMMARY ====

Session Count: 3
Session Total Duration: 0:01:41.469000
Session Action Count: 15
Session Action Total Duration: 0:01:03.091000
Task Run Count: 3
Task Run Total Duration: 0:01:01.705000 (60.8%)
Non-Task Run Count: 12
Non-Task Run Total Duration: 0:00:01.386000 (1.4%)
Sync Job Attachments Count: 0
Sync Job Attachments Total Duration: 0:00:00 (0.0%)
Env Action Count: 12
Env Action Total Duration: 0:00:01.386000 (1.4%)

Within-session Overhead Duration: 0:00:38.378000 (37.8%)
Within-session Overhead Duration Per Action: 0:00:02.558533

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Ahuge Ahuge requested a review from a team as a code owner December 11, 2024 16:50
This now matches the other new DCC naming scheme

Signed-off-by: Alex Hughes <[email protected]>
This happens via a FrameStart, FrameEnd, ChunkSize and 2 internal
parameters that are just calculations based on the previous ones.

We've also reorganized some of the code to hopefully isolate it against
future changes.

Signed-off-by: Alex Hughes <[email protected]>
@Ahuge Ahuge force-pushed the ah/feature/frame-chunking-workflow branch from ed8d7f4 to b67edc5 Compare December 11, 2024 16:51
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
14.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

dcProperties.jobAttachments.autoDetectedInputFiles.set(detectedItemsList);
}

function _generateFontReferences() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems out of the scope of this PR. Could we only have Chunking change in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants