Skip to content

Commit

Permalink
Change model call default arg values to None instead of bool vals (#1218
Browse files Browse the repository at this point in the history
)

* Change model call default arg values to None instead of bool vals

This fixes an issue with model saving where the concrete function
cannot be matched correctly

* Add linux-amd64-gpu-p100-latest-1 to actionlint config

---------

Co-authored-by: rnyak <[email protected]>
  • Loading branch information
oliverholworthy and rnyak authored Nov 1, 2023
1 parent 7d99e53 commit fcc55c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ self-hosted-runner:
labels:
- 1GPU
- 2GPU
- linux-amd64-gpu-p100-latest-1
5 changes: 4 additions & 1 deletion merlin/models/tf/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ def build(self, input_shape=None):

self.built = True

def call(self, inputs, targets=None, training=False, testing=False, output_context=False):
def call(self, inputs, targets=None, training=None, testing=None, output_context=None):
"""
Method for forward pass of the model.
Expand All @@ -1820,6 +1820,9 @@ def call(self, inputs, targets=None, training=False, testing=False, output_conte
Tensor or tuple of Tensor and ModelContext
Output of the model, and optionally the context
"""
training = training or False
testing = testing or False
output_context = output_context or False
outputs = inputs
features = self._prepare_features(inputs, targets=targets)
if isinstance(features, tuple):
Expand Down

0 comments on commit fcc55c2

Please sign in to comment.