Skip to content

Add v1 file format for MappedParallelComputationGraph and from_v1 conversion functions#1634

Open
elliottslaughter wants to merge 4 commits intoflexflow:masterfrom
elliottslaughter:json-mpcg-v1
Open

Add v1 file format for MappedParallelComputationGraph and from_v1 conversion functions#1634
elliottslaughter wants to merge 4 commits intoflexflow:masterfrom
elliottslaughter:json-mpcg-v1

Conversation

@elliottslaughter
Copy link
Contributor

@elliottslaughter elliottslaughter commented Mar 7, 2026

Adds two things:

  • V1MappedParallelComputationGraph
  • from_v1 conversion from v1 back to normal objects

Written with Claude and manually inspected/cleaned. The only part I question is the from_v1 in lib/pcg/include/pcg/file_format/v1/graphs/v1_labelled_kwarg_dataflow_graph.h, but I've looked through the code and I don't see a more obvious way to do it, so maybe that's the best we can do. Otherwise the code is fairly obvious.


This change is Reviewable

@elliottslaughter
Copy link
Contributor Author

Copying the PR feedback for visibility:

Yeah, that part is pretty messy and difficult to read, and definitely not ready for merge. All the casts should to be ommitted in favor of adding the corresponding code into nonnegative_int (or at the very least pulled out into a separate lambda), a bunch of the loops should be changed to use code from utils/containers, and all of the emplaces are a bit unidiomatic for this codebase. Also, it would probably be cleaner to structure it as function from V1KwargDataflowGraph to KwargDataflowGraph, and then add the label handling on top as a separate function.

I refactored the casts and emplace, currently working through the container code and V1KwargDataflowGraph split.

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.

1 participant