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

StateManager: Pass intermediates using normalized values, rename coerce to normalize #298

Merged
merged 13 commits into from
Oct 21, 2022

Conversation

paulmelnikow
Copy link
Contributor

No description provided.

@jbeard4
Copy link
Contributor

jbeard4 commented Oct 15, 2022

I used functools.wrap, and I think I'm using it the right way. Requires this small change to artifax: curvewise-forks/artifax#3

I am now getting this error:

    @classmethod
    def coerce(cls, value: t.Any) -> MyModel:
        if not isinstance(value, MyModel):
>           raise ValueError(f"Can't coerce {type(value).__name__} to {cls.__name__}")
E           ValueError: Can't coerce str to MyModelType

werkit/compute/graph/testing_examples.py:75: ValueError

@paulmelnikow I wanted to discuss it with you, because I fell like this is close, but I don't fully understand the error.

@jbeard4
Copy link
Contributor

jbeard4 commented Oct 15, 2022

@jbeard4 jbeard4 marked this pull request as ready for review October 17, 2022 18:05
@jbeard4
Copy link
Contributor

jbeard4 commented Oct 17, 2022

@paulmelnikow This is ready for re-review.

@jbeard4
Copy link
Contributor

jbeard4 commented Oct 17, 2022

@paulmelnikow I'm having trouble understanding why main is failing. Is it failing because of coverage?

@paulmelnikow
Copy link
Contributor Author

Is it because it needs the artifax change?

@jbeard4
Copy link
Contributor

jbeard4 commented Oct 19, 2022

@paulmelnikow This is ready for re-review.

@paulmelnikow
Copy link
Contributor Author

Let's update the main branch in our fork from the upstream repo, and then PR the change in artifax onto that and re-tag. Also let's give this a commit message that describes what's changing. Apart from that this looks great.

@paulmelnikow paulmelnikow changed the title Add failing test for coerce issue StateManager: Pass intermediates using normalized values, rename coerce to normalize Oct 20, 2022
@jbeard4 jbeard4 merged commit a2d25c7 into main Oct 21, 2022
@jbeard4 jbeard4 deleted the failing-test branch October 21, 2022 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants