Renaming scheduler lanes

Hi cryoSPARC-DevTeam,

EDIT: Nevermind, I am just stupid. In the link attached, I just had to scroll down in the codeblock to see the correct commit -.- Sorry for the inconvinence.

i want to rename/relabel our scheduler lanes, and I stumbled over this thread:

I think, similarly one can update the name by:
lanes[0][‘name’] = ‘newname’

But I cannot commit this change:

AssertionError                            Traceback (most recent call last)
<ipython-input-12-9f876e2d250e> in <module>
----> 1 cli.set_config_var()

~/cryosparc/cryosparc_master/cryosparc_compute/ in func(*args, **kwargs)
     63                     else: raise
     64             assert res, f"Did not receive a JSON response from method \"{key}\" with params {params}"
---> 65             assert 'error' not in res, f"Encountered error for method \"{key}\" with params {params}:\n{res['error']['message'] if 'message' in res['error'] else res['error']}"
     66             return res['result']
     67         return func

AssertionError: Encountered error for method "set_config_var" with params ():
ServerError: Traceback (most recent call last):
  File "/home/cryosparc_user/cryosparc/cryosparc_master/cryosparc_command/command_core/", line 150, in wrapper
    res = func(*args, **kwargs)
TypeError: set_config_var() missing 2 required positional arguments: 'name' and 'value'

I guess, there needs to be some specification of what to update.



The complexity of this task depends on your existing configuration. If you still want to rename one or more scheduler lanes (I noticed you edited your original post), please can you

  • post the outputs of the commands
    cryosparcm cli "get_scheduler_lanes()"
    cryosparcm cli "get_scheduler_targets()"
  • indicate which lane(s) to rename along with the desired new lane name(s)

Thanks, yeah I edited it, as I just didn’t saw the entire code block in the original post.

How I did it now was:

Rename the lanes

# get the lanes
lanes = cli.get_scheduler_lanes()
# just change name
lanes[0]["name"] = "newName"

# or the entire entry
lane[0] = {'desc' : 'new description', 'name' : 'newName', 'title' : 'newTitle', 'type' : 'node'}

# commit
cli.set_config_var(name="lanes", value=lanes, colname="sched_config")

As this breaks the worker allocation, afterwards I just re-added the workers in the icli

# get the workers
worker = cli.get_scheduler_targets()

# set the new lane
worker[0]["lane"] = "newName"
# repeat for each worker

# commit
cli.set_config_var(name="lanes", value=lanes, colname="sched_config")