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

Enable uninstalling requests #194

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- User guide now explains the new objective classes
- Telemetry deactivation warning is only shown to developers
- `torch`, `gpytorch` and `botorch` are lazy-loaded for improved startup time
- Failed `requests` package import now disables telemetry instead of causing an
exception. This enables using baybe after uninstalling all internet packages.

### Removed
- `model_params` attribute from `Surrogate` base class, `GaussianProcessSurrogate` and
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ host machine names are irreversibly anonymized.
- You can always deactivate all telemetry by setting the environment variable
`BAYBE_TELEMETRY_ENABLED` to `false` or `off`. For details please consult
[this page](https://emdgroup.github.io/baybe/_autosummary/baybe.telemetry.html).
- If you want to be absolutely sure, you can uninstall internet related packages such
as `requests` or `opentelemetry*` from the environment. Due to the inability of
specifying opt-out dependencies, these are installed by default, but the package
works without them.

## Authors

Expand Down
2 changes: 1 addition & 1 deletion baybe/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
from urllib.parse import urlparse

import pandas as pd
import requests

from baybe.parameters.base import Parameter
from baybe.utils.boolean import strtobool
Expand Down Expand Up @@ -134,6 +133,7 @@

# Attempt telemetry import
try:
import requests
from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import (
OTLPMetricExporter,
)
Expand Down