Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added a new dag article #1246

Merged
merged 1 commit into from
Dec 10, 2024
Merged

feat: added a new dag article #1246

merged 1 commit into from
Dec 10, 2024

Conversation

ivanleomk
Copy link
Collaborator

@ivanleomk ivanleomk commented Dec 10, 2024

Important

Adds a blog post on generating complex DAGs with GPT-4o using a two-phase approach, featuring parallel processing and state tracking.

  • New Blog Post:
    • Adds extract-model-looks.md to docs/blog/posts/.
    • Discusses generating complex DAGs with GPT-4o using a two-phase approach.
  • Content:
    • Explains challenges of generating consistent graphs with language models.
    • Describes a method for generating Choose Your Own Adventure stories using parallel processing.
    • Includes Python code examples for generating story outlines and expanding choices.
    • Highlights benefits like path-specific context, parallel generation, and controlled growth.
  • Technical Details:
    • Uses pydantic for structured validation.
    • Implements parallel choice expansion with asyncio and semaphores for rate limiting.

This description was created by Ellipsis for c08b2ed. It will automatically update as commits are pushed.

@github-actions github-actions bot added documentation Improvements or additions to documentation enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 10, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to c08b2ed in 1 minute and 3 seconds

More details
  • Looked at 271 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. docs/blog/posts/extract-model-looks.md:82
  • Draft comment:
    Use f-string syntax for variable interpolation in Python.
            - Setting: {story_input.setting}
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The code is using Jinja-style templating, which is appropriate for the context of generating dynamic content in a templating engine. The suggestion to use f-string syntax is not applicable here because f-strings are used for inline string interpolation in Python, not for templating in multi-line strings. The comment seems to misunderstand the context of the code.
    I might be missing the context of how the templating is being processed. If the code is indeed using a templating engine that requires Jinja-style syntax, then the comment is not applicable.
    The use of Jinja-style syntax suggests that a templating engine is being used, which is appropriate for this context. The comment does not apply to this situation.
    The comment should be deleted because it misunderstands the context of the code, which is using Jinja-style templating appropriately.
2. docs/blog/posts/extract-model-looks.md:83
  • Draft comment:
    Use f-string syntax for variable interpolation in Python.
            - Title: {story_input.title}
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is suggesting a change from Jinja-style templating to Python f-string syntax. However, the code appears to be using a templating system, likely within a context where Jinja-style syntax is appropriate. The suggestion to use f-strings may not be applicable if the context requires Jinja-style syntax.
    I might be missing the context in which this templating is used. If it's within a framework or library that uses Jinja-style syntax, the suggestion to use f-strings would be incorrect.
    The use of Jinja-style syntax suggests that this is part of a templating system, which would make the comment incorrect. I should consider the context of the code to determine the appropriateness of the comment.
    The comment should be deleted because the use of Jinja-style syntax is likely intentional and appropriate for the context.
3. docs/blog/posts/extract-model-looks.md:179
  • Draft comment:
    Use f-string syntax for variable interpolation in Python.
                Given this choice: {choice}
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is suggesting a change to the string interpolation method used in the Python code. The current code uses Jinja-style templating, which is not standard Python syntax. The suggestion to use f-strings is valid as it aligns with modern Python practices. However, the current code might be using Jinja templating intentionally for a specific reason, such as integration with a templating engine.
    The comment assumes that the current interpolation method is incorrect without considering the possibility that it might be intentional for compatibility with a specific templating engine.
    While the current method might be intentional, the suggestion to use f-strings is still valid as it promotes better readability and consistency with Python standards. If the Jinja-style is necessary, it should be documented.
    The comment is valid as it suggests a modern and preferred method for string interpolation in Python. It should be kept unless there is a specific reason for using Jinja-style templating, which should be documented.
4. docs/blog/posts/extract-model-looks.md:182
  • Draft comment:
    Use f-string syntax for variable interpolation in Python.
                Setting: {story.setting}
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is about a change in the code where Jinja-style templating is used for string interpolation. The suggestion to use f-string syntax is valid as it is a more Pythonic way to handle string interpolation. This is a code quality improvement suggestion, which is actionable and clear.
    The current code might be using Jinja-style templating intentionally for a specific reason, such as integration with a templating engine. The comment does not consider this possibility.
    Even if Jinja-style templating is used intentionally, the suggestion to use f-string syntax is still a valid point for improving code readability and maintainability in a typical Python context.
    The comment is relevant and suggests a valid code quality improvement. It should be kept as it provides a clear and actionable suggestion.
5. docs/blog/posts/extract-model-looks.md:183
  • Draft comment:
    Use f-string syntax for variable interpolation in Python.
                Plot: {story.plot_summary}
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The code is using Jinja-style templating, which is appropriate for the context of generating content for a chat completion. The suggestion to use f-string syntax is not applicable here because f-strings are used in Python code, not in templating strings for external processing. The comment seems to misunderstand the context of the code.
    I might be missing the context in which this templating is used. If the code is meant to be executed directly in Python, then f-strings would be appropriate. However, given the context of chat completions, it seems more likely that this is a template for an external system.
    The use of Jinja-style templating is consistent with the rest of the code block, indicating that this is likely intended for an external system rather than direct Python execution.
    The comment suggesting the use of f-string syntax is incorrect because the code is using Jinja-style templating, which is appropriate for the context. The comment should be deleted.
6. docs/blog/posts/extract-model-looks.md:1
  • Draft comment:
    Ensure this new markdown file is added to mkdocs.yml for proper documentation inclusion.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_aVvXg6swZtCzcDlf


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

{% endfor %}

Generate the next story beat and 2-4 new choices.
The story should end in {{ max_depth - len(prev_choices) }} more turns.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use f-string syntax for variable interpolation in Python.

Suggested change
The story should end in {{ max_depth - len(prev_choices) }} more turns.
The story should end in {max_depth - len(prev_choices)} more turns.

Copy link

Deploying instructor-py with  Cloudflare Pages  Cloudflare Pages

Latest commit: c08b2ed
Status: ✅  Deploy successful!
Preview URL: https://7bd391a7.instructor-py.pages.dev
Branch Preview URL: https://add-dag-example.instructor-py.pages.dev

View logs

@ivanleomk ivanleomk merged commit ff1aec7 into main Dec 10, 2024
9 of 16 checks passed
@ivanleomk ivanleomk deleted the add-dag-example branch December 10, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant