workers
БесплатноБез исполняемых скриптовНе проверенRun Docker-based computational workers on NimbusImage datasets using the nimbusimage Python API. Use this skill when the user wants to run segmentation, spot…
от arjunrajlaboratory★ 22 звезды на GitHubОб этом скилле
NimbusImage — Workers
Workers are Docker containers that perform computations on datasets — segmentation, spot detection, measurements, image processing. They run server-side via Girder Worker and are tracked as jobs.
There are two kinds of workers:
- Annotation workers — create annotations (points, polygons) on image data
- Property workers — compute measurement values for existing annotations
RULE: worker accessors are NOT interchangeable
Each worker kind has its own accessor, and they submit to different endpoints with different payload formats:
- Annotation workers →
ds.annotations.compute(...)→POST /upenn_annotation/compute - Property workers → create/get a
Property, thends.properties.compute(prop, ...)→POST /annotation_property/{id}/compute
Never pass a property-worker image to ds.annotations.compute, and never pass an annotation-worker image to ds.properties.compute. Both accessors now cross-check the image's role labels against /worker_interface/available before submitting and raise ValueError naming the correct accessor on a known mismatch — but the check is best-effort (an image missing from the listing, carrying no role labels, or an inaccessible discovery endpoint passes through unvalidated), so a mismatch can still submit and then crash inside the worker with a confusing error.
The wire formats differ in a way that makes the crash recognizable:
- Annotation compute sends a list-valued top-level
tagsfield — the tags to put on created annotations — plusassignment,tile,connectTo,type="worker", andid="". - Property compute sends
tagsas a dict:{"tags": [...], "exclusive": bool}— an annotation filter selecting which existing annotations to measure.
So if a property worker crashes with AttributeError: 'list' object has no attribute 'get' while reading tags, and its payload contains assignment/tile/connectTo, list-valued tags, type="worker", and id="" — that is an accessor/endpoint mismatch: the job was submitted through ds.annotations.compute. It is not malformed tag serialization to be normalized inside the worker; fix the caller, not the worker.
# WRONG — blob_intensity_worker is a PROPERTY worker; this submits an
# annotation-compute payload (list-valued tags, assignment, tile, connectTo)
# and the worker crashes: AttributeError: 'list' object has no attribute 'get'
job = ds.annotations.compute(
image="properties/blob_intensity_worker:latest",
channel=0,
tags=["blobs"],
worker_interface={"Channel": 0},
)
# RIGHT — go through the property accessor
prop = ds.properties.get_or_create("Blob Intensity", shape="polygon")
ds.properties.register(prop.id)
job = ds.properties.compute(prop, worker_interface={"Channel": 0})
To tell which kind a worker is, check its Docker labels by key presence (see "Discovering workers" below).
Discovering workers
import nimbusimage as ni
client = ni.connect()
# List all available worker images on the server
workers = client.list_workers()
for image, labels in workers.items():
# Role labels are MARKER labels: they are commonly set with an
# empty-string value (docker build --label isPropertyWorker), so
# detect the role by KEY PRESENCE, never by comparing the value.
is_annotation = "isAnnotationWorker" in labels
is_property = "isPropertyWorker" in labels
print(f"{image}: {labels.get('interfaceName', '')} "
f"[ann={is_annotation}, prop={is_property}]")
# Get the parameter interface for a specific worker
interface = client.get_worker_interface("annotations/random_squares:latest")
for param_name, spec in interface.items():
print(f" {param_name}: type={spec['type']}, default={spec.get('default', '')}")
Worker labels include:
isAnnotationWorker/isPropertyWorker— role markers; check with"isAnnotationWorker" in labels, not== "true"(the value is usually the empty string). A worker may carry both roles.interfaceName— display namedescription— what it doesannotationShape— shape it produces (point, polygon, etc.)
Do not infer the role from the image path prefix (annotations/..., properties/...): registry-qualified images may have arbitrary prefixes (e.g. ghcr.io/lab/blob_intensity_worker:latest). The labels are the only reliable signal.
Running annotation workers
ds = client.dataset("dataset_id")
# Submit a worker job
job = ds.annotations.compute(
image="annotations/random_squares:latest",
channel=0,
tags=["detected"],
worker_interface={
"Number of squares": 100,
"Square size": 15,
},
)
# Wait for completion (prints progress to stderr)
success = job.wait()
print(f"Job {'succeeded' if success else 'failed'}")
With auto-connection
When an annotation worker creates new annotations, you can auto-connect them to existing nearest neighbors:
job = ds.annota
Установить workers в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл workers?
Run Docker-based computational workers on NimbusImage datasets using the nimbusimage Python API. Use this skill when the user wants to run segmentation, spot detection, property computation, or any Docker worker on their imaging data. Also use when you see ds.annotations.compute or ds.properties.compute in code, or the user mentions running workers, submitting jobs, tracking job status, or automating image analysis pipelines on a NimbusImage server.
Как установить скилл workers?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл workers запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic