ID 470149 - CopyCat node's resumeTraining knob cannot be executed in Terminal mode

Follow

Problem summary:
CopyCat node's resumeTraining knob cannot be executed in Terminal mode

 

Customer reported version:
Nuke 15.1v1

 

Customer reported platform:
N/A

 

Steps to reproduce:
1) Launch NukeX in Terminal mode, like with the following command:

"C:\Program Files\Nuke15.1v2\Nuke15.1.exe" --nukex -ti

2) Once the Python interpreter appears, enter the following commands to create a simple CopyCat script, save it, and begin training:

cn = nuke.nodes.Constant() cc = nuke.nodes.CopyCat() cc.setInput(0, cn) cc.setInput(1, cn) cc["batchSizeType"].setValue(1) cc["batchSize"].setValue(1) cc["dataDirectory"].setValue("C:/tmp/") nuke.scriptSave("C:/tmp/copycat_training.nk") cc["startTraining"].execute()

3) After the training has progressed a few steps, use Ctrl+C to terminate the process:

4) Launch NukeX in Terminal mode again, then run the following commands:

nuke.scriptOpen("C:/tmp/copycat_training.nk")nuke.toNode('CopyCat1')["resumeTraining"].execute()

5) Observe the RuntimeError that occurs: 

RuntimeError: CopyCat1: Unable to find optimiser state and corresponding checkpoint to resume from.CopyCat1: Unable to find optimiser state and corresponding checkpoint to resume from.

 

Expected behavior:
Executing a CopyCat node's resumeTraining knob should be possible in Terminal mode.

 

Actual behavior:
When using Python to execute a CopyCat node's resumeTraining knob without the GUI, RuntimeErrors occur as the optimiser state and checkpoint cannot be found.

 

Workaround:
Open the .nk Nuke script via the GUI (not Terminal mode) and press the CopyCat's Resume Training button. 

 

Reproduced by Support in:

Nuke 15.1v2 - Windows 11, macOS 14 Sonoma

Nuke 15.1v1 - Windows 11, macOS 14 Sonoma - Regression

 

Unable to reproduce bug in:
Nuke 15.0v5 - Windows 11, macOS 14 Sonoma

 

Earliest version tested:
Nuke 15.0v5 - This issue doesn't appear in this version and has regressed

    We're sorry to hear that

    Please tell us why