[DO NOT MERGE] release: remove feature flags for experiment sharing (#9257)

release: remove feature flags for experiment sharing
This commit is contained in:
skshetry
2023-04-17 12:53:27 +05:45
committed by GitHub
parent 1c394986db
commit 7841020b2b
2 changed files with 13 additions and 15 deletions
+4 -3
View File
@@ -302,9 +302,6 @@ SCHEMA = {
"feature": FeatureSchema(
{
Optional("machine", default=False): Bool,
Optional("push_exp_to_studio", default=False): Bool,
"studio_token": str,
"studio_url": str,
},
),
"plots": {
@@ -330,4 +327,8 @@ SCHEMA = {
"config_dir": str,
"config_name": str,
},
"studio": {
"token": str,
"url": str,
},
}
+9 -12
View File
@@ -39,21 +39,18 @@ class UploadError(DvcException):
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
@@ -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")