Skip to content

Conversation

@paulnoirel
Copy link
Contributor

@paulnoirel paulnoirel commented Dec 31, 2025

Format updated by linter

Description

In the SDK, remove a limitation in workflow management so nodes can accept multiple inputs from different nodes, and not just from initial nodes.

image

Tests:

  1. In the Labelbox platform, create a new project

  2. For 1. change the workflow like the following:

    image
  3. Create a second project

  4. From the SDK, update the values and run the following scripts:

    import labelbox as lb
    
    # Values to update
    API_KEY = "<your API KEY>"
    SOURCE_PROJECT_ID = "<project ID from 1.>"
    TARGET_PROJECT_ID = "<project ID from 2.>"
    
    client = lb.Client(API_KEY)
    target_project = client.get_project(TARGET_PROJECT_ID)
    
    # The following must be successful if SOURCE_PROJECT_ID is a project with a valid workflow
    target_project.clone_from_project(SOURCE_PROJECT_ID)

Fixes PLT-3337

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?
  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

Note

Enables multi-input nodes from any predecessors by relaxing validation rules.

  • Updates WorkflowValidator.validate_node_connections to remove the check that all predecessors must be initial nodes; still enforces at least one incoming for non-initial and at least one outgoing for non-terminal nodes
  • Adds integration test test_workflow_allows_multiple_incoming_from_non_initial_nodes in tests/integration/test_workflow.py
  • Adds unit tests in tests/unit/test_workflow_utils_validation.py to verify multiple incoming from non-initial nodes is allowed and that missing incoming connections are still flagged

Written by Cursor Bugbot for commit fb13a5f. This will update automatically on new commits. Configure here.

Format updated by linter
@paulnoirel paulnoirel requested a review from mrobers1982 January 9, 2026 15:24
@paulnoirel paulnoirel marked this pull request as ready for review January 9, 2026 15:24
@paulnoirel paulnoirel requested a review from a team as a code owner January 9, 2026 15:24
@paulnoirel paulnoirel changed the title Remove input tests [PLT-3337] SDK - Workflow Management Remove input tests Jan 12, 2026
@paulnoirel paulnoirel merged commit 8cc6076 into develop Jan 13, 2026
45 of 46 checks passed
@paulnoirel paulnoirel deleted the pno/PLT-3337-SDK-Remove-node-input-limit branch January 13, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants