Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
verl
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhangXiaoyun
verl
Commits
44a65f95
Unverified
Commit
44a65f95
authored
Mar 23, 2025
by
Jiawei Liu
Committed by
GitHub
Mar 23, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: slicing returns DataProto not DataProtoItem (#718)
parent
db1d3251
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
verl/protocol.py
+3
-2
No files found.
verl/protocol.py
View file @
44a65f95
...
...
@@ -197,7 +197,8 @@ class DataProto:
def
__getitem__
(
self
,
item
):
tensor_data
=
self
.
batch
[
item
]
non_tensor_data
=
{
key
:
val
[
item
]
for
key
,
val
in
self
.
non_tensor_batch
.
items
()}
return
DataProtoItem
(
batch
=
tensor_data
,
non_tensor_batch
=
non_tensor_data
,
meta_info
=
self
.
meta_info
)
return_type
=
DataProto
if
isinstance
(
item
,
slice
)
else
DataProtoItem
return
return_type
(
batch
=
tensor_data
,
non_tensor_batch
=
non_tensor_data
,
meta_info
=
self
.
meta_info
)
def
__getstate__
(
self
):
import
io
...
...
@@ -603,7 +604,7 @@ import ray
class
DataProtoFuture
:
"""
DataProtoFuture aims to eliminate actual data fetching on driver. By doing so, the driver doesn't have to wait
for data so that asynchronous execution becomes possible.
for data so that asynchronous execution becomes possible.
DataProtoFuture contains a list of futures from another WorkerGroup of size world_size.
- collect_fn is a Callable that reduces the list of futures to a DataProto
- dispatch_fn is a Callable that partitions the DataProto into a list of DataProto of size world_size and then select
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment