Skip to content

Commit

Permalink
[Tensorflow][Inference][Sagemaker] Test gevent monkey patching fix fo…
Browse files Browse the repository at this point in the history
…r recursion error (#4397)

* move gevent monkey patching to python_service.py

* Update ['dlc_developer_config.toml']

dlc_developer_config.toml:
{   'build': {   'build_frameworks': ['tensorflow'],
                 'build_inference': True,
                 'build_training': False},
    'buildspec_override': {   'dlc-pr-tensorflow-2-inference': 'tensorflow/inference/buildspec-2-16-sm.yml'},
    'dev': {   'deep_canary_mode': False,
               'graviton_mode': False,
               'neuronx_mode': False},
    'test': {   'ec2_tests': True,
                'ecs_tests': True,
                'eks_tests': True,
                'sagemaker_local_tests': True,
                'sagemaker_remote_tests': True,
                'sanity_tests': True}}

* turn off autopatch

* revert toml
  • Loading branch information
sallyseok authored Oct 30, 2024
1 parent 7a4e592 commit 2c4a77e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tensorflow/inference/buildspec-2-16-sm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ framework: &FRAMEWORK tensorflow
version: &VERSION 2.16.1
short_version: &SHORT_VERSION 2.16
arch_type: x86
autopatch_build: "True"
# autopatch_build: "True"

repository_info:
inference_repository: &INFERENCE_REPOSITORY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

# monkey patching to ensure that all I/O operations are properly made asynchronous.
import gevent.monkey

gevent.monkey.patch_all()

import bisect
import argparse
import importlib.util
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

# monkey patching to ensure that all I/O operations are properly made asynchronous.
import gevent.monkey

gevent.monkey.patch_all()

import boto3
import logging
import os
Expand Down

0 comments on commit 2c4a77e

Please sign in to comment.