Author Topic: Issues with setting the rangeOrdering(ascending, binary, etc.)  (Read 2611 times)


  • Jr. Member
  • **
  • Posts: 4
Issues with setting the rangeOrdering(ascending, binary, etc.)
« on: January 20, 2011, 10:02:01 AM »
I'm trying to incorporate the ordering (ascending, descending, binary) functionality into our render submitter. I'm using the following (snippet):

Code: [Select]
job['package']['rangeOrdering'] = 'descending'
job['package']['range'] = '1-100'
job['package']['rangeChunkSize'] = '20'
job['agenda'] = qb.genchunks(20, '1-100')
result = qb.submit(job)

The above when submitted through the python script doesn't work (it renders as ascending). However, when I click on 'Resubmit' through the QubeGUI client, the render is done in descending order.

Does anyone know what other parameter needs to be submitted to Qube for the ordering to work as expected?

I noticed that when I click on 'Resubmit' the following Package attribute is also created, which isn't created in my script:

rangeExecution  : chunks:20

I tried to set the above in my script as a string, dict, but none of those worked.

Any help appreciated.


« Last Edit: January 20, 2011, 07:11:55 PM by sajjad »

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Re: Issues with setting the rangeOrdering(ascending, binary, etc.)
« Reply #1 on: January 20, 2011, 09:51:31 PM »
qb.submit() Submission
The QubeGUI keys off of the 'rangeOrdering' parameter when it does a submit or resubmit.  It uses that value to determine the parameters to send to qb.genchunks().

For a binary sort, use
Code: [Select]
job['agenda'] = qb.genchunks(20, '1-100', binarySort=True)
For descending ordering use the standary list reverse function
Code: [Select]
job['agenda'] = qb.genchunks(20, '1-100')

QubeGUI Submission
If you submit the job directly through the qubegui via the commandline, then it will do that qb.genchunks() for you automatically based on the "range" and "rangeOrdering" parameters.

qube --submitDict "{<put your job dict here>}"

Reference qb.genchunks()
For reference see the Python API docs or use the inline help with "help(qb.genchunks)".

Help on function genchunks in module qb:

genchunks(chunksize, range, *extraRanges, **kwargs)
    Generate a work agenda (individual Work items) in frame chunks based upon range list.
    Automatically removes duplicate items in the list.
    :See: `rangesplit`, `rangechunk`, `rangepartition`
    :See: `genframes`, `genchunks`, `genpartitions`
    :Change: Added "binarySort" keyword option for Qube 5.3
        chunksize : int
            number of frames per chunk
        range : str
            Frame range string (additional ranges can be specified)
                - n1                                       (ie.  1)
                - n1,n2,...   -- comma separated list      (i.e. 1,2,3,5,10)
                - n1-n2       -- n1 through n2             (i.e. 1-10)
                - n1-n2xStep  -- n1 through n2, step Step  (i.e. 1-10x2)
        binarySort : bool
            perform a binary sort (first, last, middle) on the resulting order (default=False)
    :Returns: list of Work instances. ([`Work`])
    :Example: qb.genchunks(10, '1-100')
    :Example: qb.genchunks(10, '-100--10')


  • Jr. Member
  • **
  • Posts: 4
Re: Issues with setting the rangeOrdering(ascending, binary, etc.)
« Reply #2 on: January 21, 2011, 10:59:58 AM »
Hi Scot,
Thanks for your reply. It's working now  :D

I was using the following file for reference purposes:

This file doesn't include the term 'reverse'. Should I be looking at some other file too?