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

[serve] Remove JSON ser/de logic from DAG building #37198

Merged
merged 7 commits into from
Jul 7, 2023

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Jul 7, 2023

Why are these changes needed?

Originally, we planned to export the full DAG nodes into the Serve config file so we made them JSON serializable. That is no longer the API, which is now quite stable, so removing the JSON serialization code as it adds quite a lot of complexity.

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

edoakes added 2 commits July 7, 2023 10:42
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes requested a review from a team July 7, 2023 15:44
@edoakes
Copy link
Contributor Author

edoakes commented Jul 7, 2023

@shrekris-anyscale you're probably best person to review this.

All I did was delete the json ser/de code and use cloudpickle instead.

edoakes added 2 commits July 7, 2023 11:45
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Copy link
Contributor

@shrekris-anyscale shrekris-anyscale left a comment

Choose a reason for hiding this comment

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

Nice, thanks for deleting all that code! The changes so far look good. Couple questions–

  1. Could you also fix the typo (dummpy -> dummy) in this line while you're at it?
  2. Should we pickle deployments when we bind them instead of schematizing them? I believe we're schematizing them right now to make the nodes json-serializable.

@edoakes
Copy link
Contributor Author

edoakes commented Jul 7, 2023

@shrekris-anyscale good catch - fixed the typo.

That sounds like a good further simplification. Do you want to take a stab at it if/when you have time?

@shrekris-anyscale
Copy link
Contributor

That sounds like a good further simplification. Do you want to take a stab at it if/when you have time?

Yeah, I can take it when I get more time.

edoakes added 2 commits July 7, 2023 13:24
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes self-assigned this Jul 7, 2023
@edoakes edoakes force-pushed the remove-json-serde branch from 23fddc5 to f741e17 Compare July 7, 2023 20:22
…ve-json-serde

Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
@edoakes edoakes merged commit 159e8d8 into ray-project:master Jul 7, 2023
edoakes added a commit that referenced this pull request Jul 10, 2023
Previously this code was relying on an implementation detail (DAG nodes not being serializable) to illustrate the point about static DAGs. Serializability was enabled in #37198.

I've updated the code sample to show that the DAG must be constructed statically and returning nodes from other nodes will be evaluated at runtime.
Bhav00 pushed a commit to Bhav00/ray that referenced this pull request Jul 11, 2023
Previously this code was relying on an implementation detail (DAG nodes not being serializable) to illustrate the point about static DAGs. Serializability was enabled in ray-project#37198.

I've updated the code sample to show that the DAG must be constructed statically and returning nodes from other nodes will be evaluated at runtime.

Signed-off-by: Bhavpreet Singh <singh.bhavpreet00@gmail.com>
Bhav00 pushed a commit to Bhav00/ray that referenced this pull request Jul 28, 2023
Originally, we planned to export the full DAG nodes into the Serve config file so we made them JSON serializable. That is no longer the API, which is now quite stable, so removing the JSON serialization code as it adds quite a lot of complexity.
NripeshN pushed a commit to NripeshN/ray that referenced this pull request Aug 15, 2023
Previously this code was relying on an implementation detail (DAG nodes not being serializable) to illustrate the point about static DAGs. Serializability was enabled in ray-project#37198.

I've updated the code sample to show that the DAG must be constructed statically and returning nodes from other nodes will be evaluated at runtime.

Signed-off-by: NripeshN <nn2012@hw.ac.uk>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Originally, we planned to export the full DAG nodes into the Serve config file so we made them JSON serializable. That is no longer the API, which is now quite stable, so removing the JSON serialization code as it adds quite a lot of complexity.

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Previously this code was relying on an implementation detail (DAG nodes not being serializable) to illustrate the point about static DAGs. Serializability was enabled in ray-project#37198.

I've updated the code sample to show that the DAG must be constructed statically and returning nodes from other nodes will be evaluated at runtime.

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
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