Skip to content

[RES-804] Track additional per-user properties#42

Merged
safaricd merged 6 commits into
mainfrom
RES-804
Nov 4, 2025
Merged

[RES-804] Track additional per-user properties#42
safaricd merged 6 commits into
mainfrom
RES-804

Conversation

@safaricd
Copy link
Copy Markdown
Collaborator

@safaricd safaricd commented Nov 3, 2025

Change Description

With this change, we track additional properties for fit and predict events:

  • torch version
  • sklearn version
  • Name of the GPU device

On the GDPR side, we are safe with tracking these as they will not allow us to fingerprint users based on these.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @safaricd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the telemetry data collected during model operations (fit and predict) to include details about the user's software and hardware environment. By capturing versions of key libraries like PyTorch and scikit-learn, along with GPU information, the system gains richer insights into usage patterns without compromising user privacy, as confirmed by GDPR considerations.

Highlights

  • Telemetry Enhancement: Added tracking for torch version, sklearn version, and GPU device name for fit and predict events to gather more comprehensive environment data.
  • New Utility Functions: Introduced _get_torch_version, _get_sklearn_version, _get_gpu_type, and a generic _get_package_version to efficiently retrieve software versions and hardware details.
  • Event Class Refactoring: Created a new ModelCallEvent base class to centralize common properties and the newly added environment details, which FitEvent and PredictEvent now inherit from.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds tracking for torch and sklearn versions, as well as the GPU type, to the telemetry events. The introduction of a ModelCallEvent base class is a nice refactoring that improves code structure by reducing duplication between FitEvent and PredictEvent. My review includes a suggestion for the new _get_gpu_type function to make its return values less ambiguous and to improve its robustness. Overall, these are good additions for richer telemetry.

Comment thread src/tabpfn_common_utils/telemetry/core/events.py Outdated
@safaricd safaricd requested a review from noahho November 3, 2025 16:29
Copy link
Copy Markdown
Collaborator

@noahho noahho left a comment

Choose a reason for hiding this comment

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

Very nice! Minor suggestions:

  • [med] Add TPU detection?
  • [high] add package versions: tabpfn-extensions, numpy, pandas, maybe autogluon (would help us understand if people ran us from AG as well?)
  • [med] detect Colab / Kaggle / Notebook context
  • [important] torch.version.cuda, torch.backends.cudnn.version()
  • [important] python version!
  • [important] "os": platform.system(),

Copy link
Copy Markdown
Collaborator

@noahho noahho left a comment

Choose a reason for hiding this comment

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

see previous feedback, adding more info

@safaricd
Copy link
Copy Markdown
Collaborator Author

safaricd commented Nov 3, 2025

@noahho

[high] add package versions: tabpfn-extensions, numpy, pandas, maybe autogluon (would help us understand if people ran us from AG as well?)

Added these too.

[med] detect Colab / Kaggle / Notebook context

We already have methods for detecting whether someone runs inside a notebook or not - however, how would this information be used after all, from an analytics point of view?

[important] python version!

We track this since day 1.

[important] "os": platform.system(),

How would this information be used after all, from an analytics point of view? I think that having information about e.g. packages/dependencies is very useful, but is information about whether someone runs TabPFN on a Mac vs. Windows relevant to us?

@noahho
Copy link
Copy Markdown
Collaborator

noahho commented Nov 3, 2025

System (windows / Mac / Unix) is very important for development, wea already have a bunch of code to support these and it's good to know how far we should go. For the colab this tells us about the kind of workload (production or experimentation?). Detecting haggle specifically would be great for gtm

@safaricd
Copy link
Copy Markdown
Collaborator Author

safaricd commented Nov 4, 2025

@noahho just added the following additional properties tracked across all events:

  • platform/OS
  • Runtime kernel (including Kaggle)

With that being said, I'll heard the changes and push a new PyPI version. Anything else you'd like to add?

Copy link
Copy Markdown
Collaborator

@noahho noahho left a comment

Choose a reason for hiding this comment

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

Perfect, thanks a lot!

@safaricd safaricd merged commit 97532d5 into main Nov 4, 2025
9 checks passed
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