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

release: remove feature flags for experiment sharing #9257

Merged
merged 1 commit into from
Apr 17, 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
7 changes: 4 additions & 3 deletions dvc/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ def __call__(self, data):
"feature": FeatureSchema(
{
Optional("machine", default=False): Bool,
Optional("push_exp_to_studio", default=False): Bool,
"studio_token": str,
"studio_url": str,
},
),
"plots": {
Expand All @@ -330,4 +327,8 @@ def __call__(self, data):
"config_dir": str,
"config_name": str,
},
"studio": {
"token": str,
"url": str,
skshetry marked this conversation as resolved.
Show resolved Hide resolved
},
}
21 changes: 9 additions & 12 deletions dvc/repo/experiments/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,18 @@ def __init__(self, msg, result):
def notify_refs_to_studio(
repo: "Repo", git_remote: str, **refs: List[str]
) -> Optional[str]:
config = repo.config["feature"]
import os

config = repo.config["studio"]
refs = compact(refs)
if not refs or env2bool("DVC_TEST"):
return None

if not (config.get("studio_token") or config["push_exp_to_studio"]):
logger.debug(
"Either feature.studio_token or feature.push_exp_to_studio config "
"needs to be set."
)
return None

import os

token = os.environ.get("STUDIO_TOKEN") or config.get("studio_token")
token = (
os.environ.get("DVC_STUDIO_TOKEN")
or os.environ.get("STUDIO_TOKEN")
or config.get("token")
)
if not token:
logger.debug("Studio token not found.")
return None
Expand All @@ -63,7 +60,7 @@ def notify_refs_to_studio(
from dvc.utils import studio

_, repo_url = get_remote_repo(repo.scm.dulwich.repo, git_remote)
studio_url = config.get("studio_url")
studio_url = config.get("url")
d = studio.notify_refs(repo_url, token, base_url=studio_url, **refs)
return d.get("url")

Expand Down