Skip to content

Add grpcio-tools#1552

Merged
SohierDane merged 3 commits into
mainfrom
grpcio_tools
Jun 24, 2026
Merged

Add grpcio-tools#1552
SohierDane merged 3 commits into
mainfrom
grpcio_tools

Conversation

@SohierDane

Copy link
Copy Markdown
Contributor

Add a dependency on grpcio-tools so we can recompile proto stubs in real time for kaggle_evaluation. It's a small library (<3 MB) and for my purposes the exact version doesn't much matter so I'm hoping this isn't a controversial addition. We do have alternatives if this addition isn't feasible but they're much more invasive, most likely migrating from gRPC to HTTP.

@SohierDane SohierDane requested a review from rosbo June 23, 2026 22:22
@rosbo

rosbo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Can you add a simple smoke test under the tests forder for the grpcio-tools package for the method you are using to ensure we don't regress:

import unittest
import pandas as pd
class TestPandas(unittest.TestCase):
def test_read_csv(self):
data = pd.read_csv("/input/tests/data/train.csv")
self.assertEqual(100, len(data.index))

@Kaggle Kaggle deleted a comment from Blevins42069 Jun 24, 2026
@SohierDane

Copy link
Copy Markdown
Contributor Author

@rosbo I've added the smoke test. Thanks for the recommendation; it caught that the grpcio-tools installation needed to happen in a different location due to the way protobuf is reinstalled.

Comment thread tests/test_grpcio_tools.py Outdated
self.assertTrue(hasattr(ping_pb2_grpc, "PingServiceStub"))
self.assertTrue(hasattr(ping_pb2_grpc, "PingServiceServicer"))
finally:
sys.path.remove(tmpdir)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is redundat.

Given you are using a tempfile.TemporaryDirectory(), it should delete the directory after the "with" claude exits.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. I removed that call and the now-pointless try/finally.

@SohierDane SohierDane merged commit fc912b0 into main Jun 24, 2026
8 checks passed
@SohierDane SohierDane deleted the grpcio_tools branch June 24, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants