Stop storing references to bound methods via tf.function (#24146)
* Stop storing references to bound methods in tf.functions * Remove the gc.collect calls now that we resolved the underlying problem * Remove the default signature from model.serving entirely, big cleanup * Remove _prune_signature as self.input_signature can prune itself * Restore serving docstring * Update int support test to check the input signature * Make sure other tests also use model.input_signature and not serving.input_signature * Restore _prune_signature * Remove the doctest GC now it's no longer needed * Correct core tests to use the pruned sig * order lines correctly in core tests * Add eager_serving back with a deprecation warning
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import gc
|
||||
import unittest
|
||||
|
||||
from transformers import XGLMConfig, XGLMTokenizer, is_tf_available
|
||||
@@ -173,11 +172,6 @@ class TFXGLMModelTest(TFModelTesterMixin, PipelineTesterMixin, unittest.TestCase
|
||||
|
||||
@require_tf
|
||||
class TFXGLMModelLanguageGenerationTest(unittest.TestCase):
|
||||
def tearDown(self):
|
||||
super().tearDown()
|
||||
# clean-up as much as possible GPU memory occupied by PyTorch
|
||||
gc.collect()
|
||||
|
||||
@slow
|
||||
def test_lm_generate_xglm(self, verify_outputs=True):
|
||||
model = TFXGLMForCausalLM.from_pretrained("facebook/xglm-564M")
|
||||
|
||||
Reference in New Issue
Block a user