Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Remove telemetry tracking #2922

Merged
merged 3 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.17.6
- Remove telemetry tracking (mihran113)

## 3.17.5 Jun 2, 2023

- Fix gpu stat collection when driver is not loaded (mihran113)
Expand Down
2 changes: 0 additions & 2 deletions aim/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from aim.cli.manager.manager import run_process

from aim.utils.deprecation import python_version_deprecation_check, sqlalchemy_version_check
from aim.utils.tracking import analytics

python_version_deprecation_check()
sqlalchemy_version_check()
analytics.track_install_event()
2 changes: 0 additions & 2 deletions aim/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from aim.cli.runs import commands as runs_commands
from aim.cli.convert import commands as convert_commands
from aim.cli.storage import commands as storage_commands
from aim.cli.telemetry import commands as telemetry_commands

core._verify_python3_env = lambda: None

Expand All @@ -30,4 +29,3 @@ def cli_entry_point(verbose):
cli_entry_point.add_command(runs_commands.runs, RUNS_NAME)
cli_entry_point.add_command(convert_commands.convert, CONVERT)
cli_entry_point.add_command(storage_commands.storage, STORAGE)
cli_entry_point.add_command(telemetry_commands.telemetry)
4 changes: 0 additions & 4 deletions aim/cli/init/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
from aim.sdk.repo import Repo
from aim.sdk.utils import clean_repo_path

from aim.utils.tracking import analytics


@click.command()
@click.option('--repo', required=False, type=click.Path(exists=True,
Expand Down Expand Up @@ -34,9 +32,7 @@ def init(repo, yes):

repo = Repo.from_path(repo_path, init=True)
if re_init:
analytics.track_event(event_name='[Repo] Initialize')
click.echo(
'Re-initialized empty Aim repository at {}'.format(repo.root_path))
else:
analytics.track_event(event_name='[Repo] Re-initialize')
click.echo('Initialized a new Aim repository at {}'.format(repo.root_path))
3 changes: 0 additions & 3 deletions aim/cli/server/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
from aim.ext.transport.config import AIM_SERVER_DEFAULT_HOST, AIM_SERVER_DEFAULT_PORT, AIM_SERVER_MOUNTED_REPO_PATH
from aim.ext.transport.server import run_router

from aim.utils.tracking import analytics


@click.command()
@click.option('-h', '--host', default=AIM_SERVER_DEFAULT_HOST, type=str)
Expand Down Expand Up @@ -70,7 +68,6 @@ def server(host, port, workers,
fg='yellow'))
click.echo('Server is mounted on {}:{}'.format(host, port), err=True)
click.echo('Press Ctrl+C to exit')
analytics.track_event(event_name='[Aim Remote Tracking] Start server')

try:
run_router(host, port, workers, ssl_keyfile, ssl_certfile)
Expand Down
Empty file removed aim/cli/telemetry/__init__.py
Empty file.
18 changes: 0 additions & 18 deletions aim/cli/telemetry/commands.py

This file was deleted.

9 changes: 0 additions & 9 deletions aim/cli/up/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
AIM_UI_DEFAULT_HOST,
AIM_UI_DEFAULT_PORT,
AIM_UI_MOUNTED_REPO_PATH,
AIM_UI_TELEMETRY_KEY,
AIM_PROXY_URL,
AIM_PROFILER_KEY
)
Expand All @@ -19,8 +18,6 @@
from aim.web.utils import exec_cmd
from aim.web.utils import ShellCommandException

from aim.utils.tracking import analytics


@click.command()
@click.option('-h', '--host', default=AIM_UI_DEFAULT_HOST, type=str)
Expand Down Expand Up @@ -114,11 +111,6 @@ def up(dev, host, port, workers, uds,
except Exception:
pass

if not dev and os.getenv(AIM_UI_TELEMETRY_KEY, 1) == '0':
click.echo(f'"{AIM_UI_TELEMETRY_KEY}" is ignored. Read how to opt-out here: '
f'https://aimstack.readthedocs.io/en/latest/community/telemetry.html')
if dev:
analytics.dev_mode = True
click.echo(click.style('Running Aim UI on repo `{}`'.format(repo_inst), fg='yellow'))

if uds:
Expand All @@ -132,7 +124,6 @@ def up(dev, host, port, workers, uds,
click.echo(f'Proxy {proxy_url}{base_path}/')

click.echo('Press Ctrl+C to exit')
analytics.track_event(event_name='[Aim UI] Start UI')

if profiler:
os.environ[AIM_PROFILER_KEY] = '1'
Expand Down
2 changes: 0 additions & 2 deletions aim/cli/watcher_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from aim.sdk.run_status_watcher import RunStatusWatcher
from aim.sdk.repo import Repo

from aim.utils.tracking import analytics

core._verify_python3_env = lambda: None
DEFAULT_MESSAGE_TEMPLATE = "❗️ Something wrong with Run '{run.hash}'. Please check. ❗️"
Expand Down Expand Up @@ -78,7 +77,6 @@ def start_watcher(ctx):
watcher = RunStatusWatcher(repo)
click.secho(f'Starting Aim watcher for repo \'{repo.path}\'...', fg='yellow')
click.echo('Press Ctrl+C to exit')
analytics.track_event(event_name='[Aim Watcher] Start event watcher')

watcher.start_watcher()

Expand Down
4 changes: 0 additions & 4 deletions aim/sdk/base_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from aim.sdk.errors import MissingRunError
from aim.sdk.tracker import STEP_HASH_FUNCTIONS

from aim.utils.tracking import analytics

if TYPE_CHECKING:
from aim.sdk.repo import Repo

Expand Down Expand Up @@ -40,10 +38,8 @@ def __init__(self, run_hash: Optional[str] = None,
else:
if run_hash is None:
self.hash = generate_run_hash()
analytics.track_event(event_name='[Run] Create new run')
elif self.repo.run_exists(run_hash):
self.hash = run_hash
analytics.track_event(event_name='[Run] Resume run')
else:
raise MissingRunError(f'Cannot find Run {run_hash} in aim Repo {self.repo.path}.')
self._lock = self.repo.request_run_lock(self.hash)
Expand Down
130 changes: 0 additions & 130 deletions aim/utils/tracking.py

This file was deleted.

2 changes: 1 addition & 1 deletion aim/web/api/dashboards/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class DashboardOut(BaseModel):
id: UUID
name: str
description: str = None
description: Optional[str] = None
app_id: Optional[UUID] = None
app_type: Optional[str] = None
updated_at: datetime = 'Wed, 01 Jan 2021 16:12:07 GMT'
Expand Down
2 changes: 1 addition & 1 deletion aim/web/api/experiments/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ExperimentGetOut(BaseModel):
description: Optional[str] = ''
run_count: int
archived: bool
creation_time: Optional[float]
creation_time: Optional[float] = None


ExperimentListOut = List[ExperimentGetOut]
Expand Down
3 changes: 1 addition & 2 deletions aim/web/api/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from aim.web.api.utils import object_factory
from aim.sdk.index_manager import RepoIndexManager
from aim.storage.locking import AutoFileLock
from aim.utils.tracking import analytics

projects_router = APIRouter()

Expand All @@ -34,7 +33,7 @@ async def project_api():
'name': project.name,
'path': project.path,
'description': project.description,
'telemetry_enabled': analytics.telemetry_enabled,
'telemetry_enabled': 0,
}


Expand Down
1 change: 0 additions & 1 deletion aim/web/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
AIM_ENV_MODE_KEY = '__AIM_ENV_MODE__'
AIM_LOG_LEVEL_KEY = '__AIM_LOG_LEVEL__'
AIM_UI_MOUNTED_REPO_PATH = '__AIM_UI_MOUNT_REPO_PATH__'
AIM_UI_TELEMETRY_KEY = 'AIM_UI_TELEMETRY_ENABLED'
AIM_UI_BASE_PATH = '__AIM_UI_BASE_PATH__'
AIM_PROXY_URL = '__AIM_PROXY_URL__'
AIM_PROFILER_KEY = '__AIM_PROFILER_ENABLED__'
Expand Down
36 changes: 0 additions & 36 deletions docs/source/community/telemetry.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
:name: community
:caption: Community

community/telemetry.md
generated/CHANGELOG.md

.. raw:: html
Expand Down
2 changes: 0 additions & 2 deletions performance_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pathlib import Path

from aim.sdk.configs import AIM_REPO_NAME
from aim.utils.tracking import analytics
from performance_tests.utils import get_baseline_filename

TEST_REPO_PATHS = {
Expand Down Expand Up @@ -42,7 +41,6 @@ def _cleanup_test_repo(path):


def pytest_sessionstart(session):
analytics.dev_mode = True

if os.environ.get('AIM_LOCAL_PERFORMANCE_TEST'):
_init_test_repos()
Expand Down
Loading
Loading