Skip to content

Conversation

@zephyrzilla
Copy link
Member

Summary

This PR fixes multiple configuration management issues in the graph execution pipeline. It addresses problems with redundant config reloads, improves override handling, and adds support for custom model configurations. The changes introduce AutoNestedDict for better nested config manipulation and refactor the config flow to pass dictionaries directly instead of file paths, eliminating unnecessary I/O operations.

Features:

  • Graph configuration loading: Now supports direct config dict passing and existing task detection
  • Model configuration: Custom model configs can override default models.yaml values
  • Configuration overrides: .override() method now applies changes directly to config dict
  • Graph properties: Cached in memory instead of reloaded from disk on every node access
  • Workflow execution: Both programmatic and YAML-based tasks follow unified config handling

How to Test

Test 1: Existing YAML Task Execution

  1. Navigate to an existing task directory with graph_config.yaml
  2. Run: Workflow(name="<task>").run(num_records=5)

Test 2: Programmatic Workflow with Overrides

  1. Create a workflow programmatically:
   from sygra import Workflow
   from sygra.utils.utils import load_model_config

   cfg = load_model_config()
   model_cfg = cfg.get("gpt-4o")
   model_cfg["name"] = "gpt-4o"

   wf = Workflow("test_task")
   wf.source({"type": "hf", "repo_id": "glaiveai/glaive-code-assistant-v2"})
   wf.llm(model="gpt4", prompt="Tell me a fact: ")
   wf.override("graph_config.nodes.llm_1.model", model_cfg)
   wf.run(num_records=1)
  1. Verify the override is applied

Checklist

  • Lint fixes and unit testing done
  • End to end task testing
  • Documentation updated

@zephyrzilla zephyrzilla requested a review from a team as a code owner October 8, 2025 17:23
@zephyrzilla zephyrzilla self-assigned this Oct 8, 2025
@psriramsnc psriramsnc added the enhancement New feature or request label Oct 9, 2025
Copy link
Collaborator

@psriramsnc psriramsnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@zephyrzilla zephyrzilla requested a review from a team October 15, 2025 06:35
@vipul-mittal vipul-mittal enabled auto-merge (squash) October 15, 2025 06:41
@vipul-mittal vipul-mittal merged commit 3185749 into main Oct 15, 2025
6 checks passed
@vipul-mittal vipul-mittal deleted the scratch/apply_config_overrides branch October 15, 2025 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants