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

Default state for map actions + other minor testing-related fixes #466

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

elijahbenizzy
Copy link
Contributor

@elijahbenizzy elijahbenizzy commented Dec 10, 2024

Changes

Default state for MapActions is now the state that was provided. Lowers the amount needed for a common use-case.

Also did a bit of improvements on the testing side as well -- removed warnings from test suite!


Important

Set default state for MapActions and improve test clarity by renaming classes and adding tests.

  • Behavior:
    • Default state for MapActions now uses the provided state, reducing setup for common use-cases in parallelism.py.
  • Testing:
    • Added test_map_actions_default_state() in test_parallelism.py to verify default state behavior.
    • Renamed test classes in test_application.py for clarity: TestActionWithoutContext to ActionWithoutContext, TestActionWithContext to ActionWithContext, TestActionWithKwargs to ActionWithKwargs, and TestActionWithContextTracer to ActionWithContextTracer.
  • Misc:
    • Replaced parse_obj with model_validate in schema.py for BeginEntryModel, EndEntryModel, BeginSpanModel, EndSpanModel, AttributeModel, and streaming events.
    • Updated pydantic version constraint in pyproject.toml to >1.

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

Copy link

@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 8610804 in 53 seconds

More details
  • Looked at 154 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_xafvt3YBnj9M4xHL


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.

tests/core/test_application.py Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Dec 10, 2024

A preview of 7e49f99 is uploaded and can be seen here:

https://burr.dagworks.io/pull/466

Changes may take a few minutes to propagate. Since this is a preview of production, content with draft: true will not be rendered. The source is here: https://github.com/DAGWorks-Inc/burr/tree/gh-pages/pull/466/

Copy link

@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.

👍 Looks good to me! Incremental review on 607d9f3 in 16 seconds

More details
  • Looked at 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_1bOQSmVij8ATCIv1


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

@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.

👍 Looks good to me! Incremental review on 10705c4 in 26 seconds

More details
  • Looked at 41 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. burr/tracking/server/schema.py:96
  • Draft comment:
    Ensure that model_validate is the correct method to use here instead of parse_obj. This change is applied consistently across multiple lines (96, 99, 102, 108, 112, 119), so verify that this method is available and behaves as expected in the context of pydantic models.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change from parse_obj to model_validate is consistent across multiple lines. This change should be verified for correctness and consistency with the rest of the codebase.

Workflow ID: wflow_TGUKCWu99gY85EsZ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@elijahbenizzy elijahbenizzy force-pushed the default_state_map_actions branch from 10705c4 to 4a90c0b Compare December 10, 2024 22:01
THis just defaults to the passed-in state. This is an easy way to get it
to have a reasonable default and think about it less -- a common
use-case as well, when multiple actions want to function on the same
state.
This produced errors, doing some cleanup
@elijahbenizzy elijahbenizzy force-pushed the default_state_map_actions branch from 4a90c0b to e5b2e82 Compare December 10, 2024 22:02
Copy link
Contributor

@skrawcz skrawcz left a comment

Choose a reason for hiding this comment

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

might need pydantic > 1 pin?

Deprecation warnings -- this is the new/better way to do it.
Also makes pydantic>1 for the model_validate methods
@elijahbenizzy elijahbenizzy force-pushed the default_state_map_actions branch from e5b2e82 to 7e49f99 Compare December 11, 2024 23:30
@elijahbenizzy elijahbenizzy merged commit 4c7ccbd into main Dec 11, 2024
11 checks passed
@elijahbenizzy elijahbenizzy deleted the default_state_map_actions branch December 11, 2024 23:31
Copy link

@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.

👍 Looks good to me! Incremental review on 7e49f99 in 80 minutes and 28 seconds

More details
  • Looked at 55 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. pyproject.toml:82
  • Draft comment:
    Good update to require Pydantic v2 - this matches the code changes to use model_validate instead of the deprecated parse_obj.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR changes parse_obj to model_validate in schema.py. This is a good change since parse_obj is deprecated in Pydantic v2. The PR also updates the pydantic dependency to >1 in pyproject.toml to ensure compatibility. This is a good change that ensures proper Pydantic v2 usage.

Workflow ID: wflow_3LkqA6Cg1h2dVDAM


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

2 participants