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

Create dummy iters to satisy iter type len checks in core + update core commit #6600

Merged
merged 1 commit into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ WORKDIR /workspace/
# Install Megatron-core
RUN git clone https://github.com/NVIDIA/Megatron-LM.git && \
cd Megatron-LM && \
git checkout 3db2063b1ff992a971ba18f7101eecc9c4e90f03 && \
git checkout 9f8bdeb4814ed61fbc9c7d5b39c7710e77b99754 && \
pip install -e .

WORKDIR /tmp/
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pipeline {
steps {
sh 'git clone https://github.com/NVIDIA/Megatron-LM.git && \
cd Megatron-LM && \
git checkout 3db2063b1ff992a971ba18f7101eecc9c4e90f03 && \
git checkout 9f8bdeb4814ed61fbc9c7d5b39c7710e77b99754 && \
pip install -e .'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ def get_forward_output_only_func(self):
Used for generate method only for now.
"""

def fwd_output_only_func(batch, model):
def fwd_output_only_func(dataloader_iter, model):
batch = next(dataloader_iter)
extra_arg = {}
(
tokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ def loss_func(output_tensor):
return fwd_output_and_loss_func

def get_forward_output_only_func(self):
def fwd_output_only_func(batch, model):
def fwd_output_only_func(dataloader_iter, model):
batch = next(dataloader_iter)
extra_arg = {}
if len(batch) == 3:
batch = [x.cuda() for x in batch]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,8 @@ def get_forward_output_only_func(self):
Used for generate method only for now.
"""

def fwd_output_only_func(batch, model):
def fwd_output_only_func(dataloader_iter, model):
batch = next(dataloader_iter)
extra_arg = {}
(
tokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,8 @@ def get_forward_output_only_func(self):
Used for generate method only.
"""

def fwd_output_only_func(batch, model):
def fwd_output_only_func(dataloader_iter, model):
batch = next(dataloader_iter)
extra_arg = {}
(
tokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ def get_forward_output_only_func(self):
Used for generate method only for now.
"""

def fwd_output_only_func(batch, model):
def fwd_output_only_func(dataloader_iter, model):
batch = next(dataloader_iter)
extra_arg = {}
(
tokens,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def forward_step(self, batch, tensor_shape):

output_tensor = fwd_bwd_function(
forward_step_func=self.model.get_forward_output_only_func(),
data_iterator=batch,
data_iterator=iter([batch,]),
model=[self.forward_model],
num_microbatches=get_num_microbatches(),
forward_only=True,
Expand Down