데이터 표현
런타임에 블록이 받는 Python 데이터 유형: Batch, WorkflowImageData, VideoMetadata.
배치
from inference.core.workflows.execution_engine.entities.base import Batch
from inference.core.workflows.prototypes.block import BlockResult
# Workflow 블록의 run 메서드
def run(self, x: Batch[int], y: Batch[float]) -> BlockResult:
pass요소 반복
from inference.core.workflows.execution_engine.entities.base import Batch
def iterate(batch: Batch[int]) -> None:
for element in batch:
print(element)여러 배치 묶기
배치 요소 인덱스 가져오기
요소와 인덱스를 함께 가져오며 반복하기
의 추가 메서드 배치 컨테이너
WorkflowImageData
VideoMetadata
마지막 업데이트
도움이 되었나요?