-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Problem
The telemetry library creates a non-hidden directory in the user's home folder (~/intel on Linux/macOS, %LOCALAPPDATA%/Intel Corporation on Windows) that cannot be configured or relocated. This creates visual clutter in home directories and doesn't follow common practices for application data storage on Unix-like systems.
Current behavior:
- Telemetry files are always stored in
~/intel/on Linux/macOS (hardcoded insrc/utils/opt_in_checker.py:120) - Users cannot change this location via environment variable or configuration
- The folder is not hidden (no
.prefix on Unix systems) - To disable telemetry, users must either:
- Run the
opt_in_out --opt_outscript (if they have it installed) - Manually create
~/intel/openvino_telemetrywith content "0"
- Run the
Expected behavior:
Users should have better control over where telemetry data is stored and how to disable it.
Impact
This affects users who:
- Use OpenVINO indirectly through other packages (e.g.,
sentence-transformerswith OpenVINO backend) - Want to keep their home directory clean
- Prefer XDG Base Directory specification compliance
- Want to disable telemetry without creating folders
Proposed Solutions
Option 1: Environment variable to disable telemetry
Add support for OPENVINO_TELEMETRY_OPTOUT=1 environment variable:
@staticmethod
def _run_in_ci():
"""Check if telemetry should be disabled"""
# Add this check
if os.environ.get("OPENVINO_TELEMETRY_OPTOUT", "").lower() in ("1", "true", "yes"):
return True
# Existing CI checks
if "CI" in os.environ and os.environ["CI"].lower() == "true":
return True
# ... rest of existing checksThis would allow users to disable telemetry with:
export OPENVINO_TELEMETRY_OPTOUT=1Option 2: Make directory configurable
Add environment variable support for custom directory location:
@staticmethod
def consent_file_subdirectory():
"""Returns consent file subdirectory."""
# Allow override via environment variable
custom_dir = os.environ.get("OPENVINO_TELEMETRY_DIR")
if custom_dir:
return custom_dir
platform = system()
if platform == 'Windows':
return 'Intel Corporation'
elif platform in ['Linux', 'Darwin']:
return 'intel' # Consider changing to '.intel' for hidden folder
log.info('Failed to find location of the openvino_telemetry file.')
return NoneThis would allow:
# Use hidden folder
export OPENVINO_TELEMETRY_DIR=.intel
# Or use XDG standard
export OPENVINO_TELEMETRY_DIR=.local/share/openvinoOption 3: Follow XDG Base Directory specification (Best for Linux/macOS)
On Linux/macOS, respect XDG_DATA_HOME (typically ~/.local/share):
elif platform in ['Linux', 'Darwin']:
xdg_data = os.environ.get('XDG_DATA_HOME', os.path.join(Path.home(), '.local', 'share'))
return os.path.join(xdg_data, 'openvino')Files Affected
All three telemetry files use the same directory method:
openvino_telemetry(consent file) -opt_in_checker.py:129openvino_ga_cid(client ID) -cid.py:63-69stats(usage statistics) -stats_processor.py:31-35
Minimal Breaking Change Suggestion
- Add
OPENVINO_TELEMETRY_OPTOUTenvironment variable support (no breaking changes) - Change
intelto.intelon Linux/macOS for new installations (minor breaking change, but cleaner) - Support migration from old
~/intelto new~/.intelautomatically
References
- Current implementation:
src/utils/opt_in_checker.py:111-122 - Related files:
src/utils/cid.py,src/utils/stats_processor.py - XDG Base Directory spec: https://www.freedesktop.org/wiki/Specifications/basedir-spec/
Use Case
Users who install packages like sentence-transformers with OpenVINO backend should be able to:
- Easily disable telemetry without manual file creation
- Not have unexpected folders appear in their home directory
- Choose where telemetry data is stored if they do opt-in