Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ccfc648

Browse files
authored
Fix postcommit python dependency workflow (#33865)
1 parent f25c1c3 commit ccfc648

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sdks/python/apache_beam/ml/transforms/embeddings/huggingface_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def test_sentence_transformer_images_with_str_data_types(self):
328328
embedding_config))
329329

330330

331-
@unittest.skipIf(_HF_TOKEN is None, 'HF_TOKEN environment variable not set.')
331+
@unittest.skipIf(not _HF_TOKEN, 'HF_TOKEN environment variable not set.')
332332
class HuggingfaceInferenceAPITest(unittest.TestCase):
333333
def setUp(self):
334334
self.artifact_location = tempfile.mkdtemp()
@@ -366,7 +366,7 @@ def test_embeddings_with_inference_api(self):
366366
assert_that(max_ele_pcoll, equal_to(expected_output))
367367

368368

369-
@unittest.skipIf(_HF_TOKEN is None, 'HF_TOKEN environment variable not set.')
369+
@unittest.skipIf(not _HF_TOKEN, 'HF_TOKEN environment variable not set.')
370370
class HuggingfaceInferenceAPIGCSLocationTest(HuggingfaceInferenceAPITest):
371371
def setUp(self):
372372
self.artifact_location = self.gcs_artifact_location = os.path.join(

sdks/python/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ deps =
463463
447: transformers>=4.47.0,<4.48.0
464464
447: torch>=1.9.0,<1.14.0
465465
448: transformers>=4.48.0,<4.49.0
466-
448: torch>=2.0.0,torch<2.1.0
466+
448: torch>=2.0.0,<2.1.0
467467
latest: transformers>=4.48.0
468468
latest: torch>=2.0.0
469469
tensorflow==2.12.0

0 commit comments

Comments
 (0)