id int64 1 6.07M | name stringlengths 1 295 | code stringlengths 12 426k | language stringclasses 1
value | source_file stringlengths 5 202 | start_line int64 1 158k | end_line int64 1 158k | repo dict |
|---|---|---|---|---|---|---|---|
1,701 | files | def files(self, names=None, per_page=50):
"""Iterate over all files stored in this artifact.
Arguments:
names: (list of str, optional) The filename paths relative to the
root of the artifact you wish to list.
per_page: (int, default 50) The number of files to ret... | python | wandb/apis/public.py | 5,089 | 5,100 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,702 | _load_manifest | def _load_manifest(self):
if self._manifest is None:
query = gql(
"""
query ArtifactManifest(
$entityName: String!,
$projectName: String!,
$name: String!
) {
project(name: $projectName, entityName... | python | wandb/apis/public.py | 5,102 | 5,145 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,703 | _load_dependent_manifests | def _load_dependent_manifests(self):
"""Interrogate entries and ensure we have loaded their manifests."""
# Make sure dependencies are avail
for entry_key in self._manifest.entries:
entry = self._manifest.entries[entry_key]
if self._manifest_entry_is_artifact_reference(en... | python | wandb/apis/public.py | 5,147 | 5,156 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,704 | _manifest_entry_is_artifact_reference | def _manifest_entry_is_artifact_reference(entry):
"""Determine if an ArtifactManifestEntry is an artifact reference."""
return (
entry.ref is not None
and urllib.parse.urlparse(entry.ref).scheme == "wandb-artifact"
) | python | wandb/apis/public.py | 5,159 | 5,164 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,705 | _get_ref_artifact_from_entry | def _get_ref_artifact_from_entry(self, entry):
"""Helper function returns the referenced artifact from an entry."""
artifact_id = util.host_from_path(entry.ref)
return Artifact.from_id(hex_to_b64_id(artifact_id), self.client) | python | wandb/apis/public.py | 5,166 | 5,169 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,706 | used_by | def used_by(self):
"""Retrieve the runs which use this artifact directly.
Returns:
[Run]: a list of Run objects which use this artifact
"""
query = gql(
"""
query ArtifactUsedBy(
$id: ID!,
$before: String,
... | python | wandb/apis/public.py | 5,171 | 5,216 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,707 | logged_by | def logged_by(self):
"""Retrieve the run which logged this artifact.
Returns:
Run: Run object which logged this artifact
"""
query = gql(
"""
query ArtifactCreatedBy(
$id: ID!
) {
artifact(id: $id) {
... | python | wandb/apis/public.py | 5,218 | 5,254 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,708 | __init__ | def __init__(
self,
client: Client,
entity: str,
project: str,
collection_name: str,
type: str,
filters: Optional[Mapping[str, Any]] = None,
order: Optional[str] = None,
per_page: int = 50,
):
self.entity = entity
self.collectio... | python | wandb/apis/public.py | 5,263 | 5,322 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,709 | length | def length(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollection"][
"artifacts"
]["totalCount"]
else:
return None | python | wandb/apis/public.py | 5,325 | 5,331 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,710 | more | def more(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollection"][
"artifacts"
]["pageInfo"]["hasNextPage"]
else:
return True | python | wandb/apis/public.py | 5,334 | 5,340 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,711 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollection"][
"artifacts"
]["edges"][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 5,343 | 5,349 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,712 | convert_objects | def convert_objects(self):
if self.last_response["project"]["artifactType"]["artifactCollection"] is None:
return []
return [
Artifact(
self.client,
self.entity,
self.project,
self.collection_name + ":" + a["version"... | python | wandb/apis/public.py | 5,351 | 5,365 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,713 | __init__ | def __init__(
self,
client: Client,
artifact: Artifact,
names: Optional[Sequence[str]] = None,
per_page: int = 50,
):
self.artifact = artifact
variables = {
"entityName": artifact._birth_entity,
"projectName": artifact._birth_project,
... | python | wandb/apis/public.py | 5,393 | 5,412 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,714 | path | def path(self):
return [self.artifact.entity, self.artifact.project, self.artifact.name] | python | wandb/apis/public.py | 5,415 | 5,416 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,715 | length | def length(self):
return self.artifact.file_count | python | wandb/apis/public.py | 5,419 | 5,420 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,716 | more | def more(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifact"]["files"][
"pageInfo"
]["hasNextPage"]
else:
return True | python | wandb/apis/public.py | 5,423 | 5,429 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,717 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifact"]["files"][
"edges"
][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 5,432 | 5,438 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,718 | update_variables | def update_variables(self):
self.variables.update({"fileLimit": self.per_page, "fileCursor": self.cursor}) | python | wandb/apis/public.py | 5,440 | 5,441 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,719 | convert_objects | def convert_objects(self):
return [
File(self.client, r["node"])
for r in self.last_response["project"]["artifactType"]["artifact"]["files"][
"edges"
]
] | python | wandb/apis/public.py | 5,443 | 5,449 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,720 | __repr__ | def __repr__(self):
return "<ArtifactFiles {} ({})>".format("/".join(self.path), len(self)) | python | wandb/apis/public.py | 5,451 | 5,452 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,721 | __init__ | def __init__(self, api: Api, name, path: Optional[str] = None) -> None:
try:
self._job_artifact = api.artifact(name, type="job")
except CommError:
raise CommError(f"Job artifact {name} not found")
if path:
self._fpath = path
self._job_artifact.down... | python | wandb/apis/public.py | 5,463 | 5,494 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,722 | name | def name(self):
return self._name | python | wandb/apis/public.py | 5,497 | 5,498 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,723 | _set_configure_launch_project | def _set_configure_launch_project(self, func):
self.configure_launch_project = func | python | wandb/apis/public.py | 5,500 | 5,501 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,724 | _configure_launch_project_repo | def _configure_launch_project_repo(self, launch_project):
git_info = self._source_info.get("source", {}).get("git", {})
_fetch_git_repo(
launch_project.project_dir,
git_info["remote"],
git_info["commit"],
)
if os.path.exists(os.path.join(self._fpath, "... | python | wandb/apis/public.py | 5,503 | 5,517 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,725 | _configure_launch_project_artifact | def _configure_launch_project_artifact(self, launch_project):
artifact_string = self._source_info.get("source", {}).get("artifact")
if artifact_string is None:
raise LaunchError(f"Job {self.name} had no source artifact")
artifact_string, base_url, is_id = util.parse_artifact_string(a... | python | wandb/apis/public.py | 5,519 | 5,535 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,726 | _configure_launch_project_container | def _configure_launch_project_container(self, launch_project):
launch_project.docker_image = self._source_info.get("source", {}).get("image")
if launch_project.docker_image is None:
raise LaunchError(
"Job had malformed source dictionary without an image key"
)
... | python | wandb/apis/public.py | 5,537 | 5,546 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,727 | set_entrypoint | def set_entrypoint(self, entrypoint: List[str]):
self._entrypoint = entrypoint | python | wandb/apis/public.py | 5,548 | 5,549 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,728 | call | def call(
self,
config,
project=None,
entity=None,
queue=None,
resource="local-container",
resource_args=None,
project_queue=None,
):
from wandb.sdk.launch import launch_add
run_config = {}
for key, item in config.items():
... | python | wandb/apis/public.py | 5,551 | 5,586 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,729 | parse_backend_error_messages | def parse_backend_error_messages(response: requests.Response) -> List[str]:
errors = []
try:
data = response.json()
except ValueError:
return errors
if "errors" in data and isinstance(data["errors"], list):
for error in data["errors"]:
# Our tests and potentially som... | python | wandb/apis/normalize.py | 17 | 31 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,730 | normalize_exceptions | def normalize_exceptions(func: _F) -> _F:
"""Function decorator for catching common errors and re-raising as wandb.Error."""
@wraps(func)
def wrapper(*args, **kwargs):
message = "Whoa, you found a bug."
try:
return func(*args, **kwargs)
except requests.HTTPError as error... | python | wandb/apis/normalize.py | 34 | 89 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,731 | wrapper | def wrapper(*args, **kwargs):
message = "Whoa, you found a bug."
try:
return func(*args, **kwargs)
except requests.HTTPError as error:
errors = parse_backend_error_messages(error.response)
if errors:
message = " ".join(errors)
m... | python | wandb/apis/normalize.py | 38 | 87 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,732 | _disable_ssl | def _disable_ssl() -> Callable[[], None]:
# Because third party libraries may also use requests, we monkey patch it globally
# and turn off urllib3 warnings instead printing a global warning to the user.
termwarn(
"Disabling SSL verification. Connections to this server are not verified and may be i... | python | wandb/apis/__init__.py | 11 | 33 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,733 | merge_environment_settings | def merge_environment_settings(self, url, proxies, stream, verify, cert):
settings = old_merge_environment_settings(
self, url, proxies, stream, verify, cert
)
settings["verify"] = False
return settings | python | wandb/apis/__init__.py | 21 | 26 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,734 | reset | def reset():
requests.Session.merge_environment_settings = old_merge_environment_settings | python | wandb/apis/__init__.py | 30 | 31 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,735 | __init__ | def __init__(self, run, mlflow_client):
self.run = run
self.mlflow_client = mlflow_client
super().__init__() | python | wandb/apis/importers/mlflow.py | 14 | 17 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,736 | run_id | def run_id(self):
return self.run.info.run_id | python | wandb/apis/importers/mlflow.py | 19 | 20 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,737 | entity | def entity(self):
return self.run.info.user_id | python | wandb/apis/importers/mlflow.py | 22 | 23 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,738 | project | def project(self):
return "imported-from-mlflow" | python | wandb/apis/importers/mlflow.py | 25 | 26 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,739 | config | def config(self):
return self.run.data.params | python | wandb/apis/importers/mlflow.py | 28 | 29 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,740 | summary | def summary(self):
return self.run.data.metrics | python | wandb/apis/importers/mlflow.py | 31 | 32 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,741 | metrics | def metrics(self):
def wandbify(metrics):
for step, t in enumerate(metrics):
d = {m.key: m.value for m in t}
d["_step"] = step
yield d
metrics = [
self.mlflow_client.get_metric_history(self.run.info.run_id, k)
for k in ... | python | wandb/apis/importers/mlflow.py | 34 | 53 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,742 | wandbify | def wandbify(metrics):
for step, t in enumerate(metrics):
d = {m.key: m.value for m in t}
d["_step"] = step
yield d | python | wandb/apis/importers/mlflow.py | 35 | 39 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,743 | run_group | def run_group(self):
# this is nesting? Parent at `run.info.tags.get("mlflow.parentRunId")`
return f"Experiment {self.run.info.experiment_id}" | python | wandb/apis/importers/mlflow.py | 55 | 57 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,744 | job_type | def job_type(self):
# Is this the right approach?
return f"User {self.run.info.user_id}" | python | wandb/apis/importers/mlflow.py | 59 | 61 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,745 | display_name | def display_name(self):
return self.run.info.run_name | python | wandb/apis/importers/mlflow.py | 63 | 64 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,746 | notes | def notes(self):
return self.run.data.tags.get("mlflow.note.content") | python | wandb/apis/importers/mlflow.py | 66 | 67 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,747 | tags | def tags(self):
return {
k: v for k, v in self.run.data.tags.items() if not k.startswith("mlflow.")
} | python | wandb/apis/importers/mlflow.py | 69 | 72 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,748 | start_time | def start_time(self):
return self.run.info.start_time // 1000 | python | wandb/apis/importers/mlflow.py | 74 | 75 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,749 | runtime | def runtime(self):
return self.run.info.end_time // 1_000 - self.start_time() | python | wandb/apis/importers/mlflow.py | 77 | 78 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,750 | git | def git(self):
... | python | wandb/apis/importers/mlflow.py | 80 | 81 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,751 | artifacts | def artifacts(self):
for f in self.mlflow_client.list_artifacts(self.run.info.run_id):
dir_path = mlflow.artifacts.download_artifacts(run_id=self.run.info.run_id)
full_path = dir_path + f.path
yield (f.path, full_path) | python | wandb/apis/importers/mlflow.py | 83 | 87 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,752 | __init__ | def __init__(
self, mlflow_tracking_uri, mlflow_registry_uri=None, wandb_base_url=None
) -> None:
super().__init__()
self.mlflow_tracking_uri = mlflow_tracking_uri
mlflow.set_tracking_uri(self.mlflow_tracking_uri)
if mlflow_registry_uri:
mlflow.set_registry_uri(m... | python | wandb/apis/importers/mlflow.py | 91 | 100 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,753 | import_one | def import_one(
self,
run: ImporterRun,
overrides: Optional[Dict[str, Any]] = None,
) -> None:
mlflow.set_tracking_uri(self.mlflow_tracking_uri)
super().import_one(run, overrides) | python | wandb/apis/importers/mlflow.py | 102 | 108 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,754 | download_all_runs | def download_all_runs(self) -> Iterable[MlflowRun]:
for exp in self.mlflow_client.search_experiments():
for run in self.mlflow_client.search_runs(exp.experiment_id):
yield MlflowRun(run, self.mlflow_client) | python | wandb/apis/importers/mlflow.py | 110 | 113 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,755 | coalesce | def coalesce(*arg: Any) -> Any:
"""Return the first non-none value in the list of arguments. Similar to ?? in C#."""
return next((a for a in arg if a is not None), None) | python | wandb/apis/importers/base.py | 21 | 23 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,756 | send_manager | def send_manager(root_dir):
sm = SendManager.setup(root_dir, resume=False)
try:
yield sm
finally:
# flush any remaining records
while sm:
data = next(sm)
sm.send(data)
sm.finish() | python | wandb/apis/importers/base.py | 27 | 36 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,757 | __init__ | def __init__(self) -> None:
self.interface = InterfaceQueue()
self.run_dir = f"./wandb-importer/{self.run_id()}" | python | wandb/apis/importers/base.py | 40 | 42 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,758 | run_id | def run_id(self) -> str:
_id = wandb.util.generate_id()
wandb.termwarn(f"`run_id` not specified. Autogenerating id: {_id}")
return _id | python | wandb/apis/importers/base.py | 44 | 47 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,759 | entity | def entity(self) -> str:
_entity = "unspecified-entity"
wandb.termwarn(f"`entity` not specified. Defaulting to: {_entity}")
return _entity | python | wandb/apis/importers/base.py | 49 | 52 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,760 | project | def project(self) -> str:
_project = "unspecified-project"
wandb.termwarn(f"`project` not specified. Defaulting to: {_project}")
return _project | python | wandb/apis/importers/base.py | 54 | 57 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,761 | config | def config(self) -> Dict[str, Any]:
return {} | python | wandb/apis/importers/base.py | 59 | 60 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,762 | summary | def summary(self) -> Dict[str, float]:
return {} | python | wandb/apis/importers/base.py | 62 | 63 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,763 | metrics | def metrics(self) -> List[Dict[str, float]]:
"""Metrics for the run.
We expect metrics in this shape:
[
{'metric1': 1, 'metric2': 1, '_step': 0},
{'metric1': 2, 'metric2': 4, '_step': 1},
{'metric1': 3, 'metric2': 9, '_step': 2},
...
]
... | python | wandb/apis/importers/base.py | 65 | 86 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,764 | run_group | def run_group(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 88 | 89 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,765 | job_type | def job_type(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 91 | 92 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,766 | display_name | def display_name(self) -> str:
return self.run_id() | python | wandb/apis/importers/base.py | 94 | 95 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,767 | notes | def notes(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 97 | 98 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,768 | tags | def tags(self) -> Optional[List[str]]:
... | python | wandb/apis/importers/base.py | 100 | 101 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,769 | artifacts | def artifacts(self) -> Optional[Iterable[Tuple[Name, Path]]]:
... | python | wandb/apis/importers/base.py | 103 | 104 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,770 | os_version | def os_version(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 106 | 107 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,771 | python_version | def python_version(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 109 | 110 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,772 | cuda_version | def cuda_version(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 112 | 113 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,773 | program | def program(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 115 | 116 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,774 | host | def host(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 118 | 119 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,775 | username | def username(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 121 | 122 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,776 | executable | def executable(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 124 | 125 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,777 | gpus_used | def gpus_used(self) -> Optional[str]:
... | python | wandb/apis/importers/base.py | 127 | 128 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,778 | cpus_used | def cpus_used(self) -> Optional[int]: # can we get the model?
... | python | wandb/apis/importers/base.py | 130 | 131 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,779 | memory_used | def memory_used(self) -> Optional[int]:
... | python | wandb/apis/importers/base.py | 133 | 134 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,780 | runtime | def runtime(self) -> Optional[int]:
... | python | wandb/apis/importers/base.py | 136 | 137 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,781 | start_time | def start_time(self) -> Optional[int]:
... | python | wandb/apis/importers/base.py | 139 | 140 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,782 | _make_run_record | def _make_run_record(self) -> pb.Record:
run = pb.RunRecord()
run.run_id = self.run_id()
run.entity = self.entity()
run.project = self.project()
run.display_name = coalesce(self.display_name())
run.notes = coalesce(self.notes(), "")
run.tags.extend(coalesce(self.t... | python | wandb/apis/importers/base.py | 142 | 159 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,783 | _make_summary_record | def _make_summary_record(self) -> pb.Record:
d: dict = {
**self.summary(),
"_runtime": self.runtime(), # quirk of runtime -- it has to be here!
# '_timestamp': self.start_time()/1000,
}
summary = self.interface._make_summary_from_dict(d)
return self.i... | python | wandb/apis/importers/base.py | 161 | 168 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,784 | _make_history_records | def _make_history_records(self) -> Iterable[pb.Record]:
for _, metrics in enumerate(self.metrics()):
history = pb.HistoryRecord()
for k, v in metrics.items():
item = history.item.add()
item.key = k
item.value_json = json.dumps(v)
... | python | wandb/apis/importers/base.py | 170 | 177 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,785 | _make_files_record | def _make_files_record(self, files_dict) -> pb.Record:
# when making the metadata file, it captures most things correctly
# but notably it doesn't capture the start time!
files_record = pb.FilesRecord()
for path, policy in files_dict["files"]:
f = files_record.files.add()
... | python | wandb/apis/importers/base.py | 179 | 187 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,786 | _make_metadata_files_record | def _make_metadata_files_record(self) -> pb.Record:
self._make_metadata_file(self.run_dir)
return self._make_files_record(
{"files": [[f"{self.run_dir}/files/wandb-metadata.json", "end"]]}
) | python | wandb/apis/importers/base.py | 189 | 193 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,787 | _make_artifact_record | def _make_artifact_record(self) -> pb.Record:
art = wandb.Artifact(self.display_name(), "imported-artifacts")
artifacts = self.artifacts()
if artifacts is not None:
for name, path in artifacts:
art.add_file(path, name)
proto = self.interface._make_artifact(art... | python | wandb/apis/importers/base.py | 195 | 210 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,788 | _make_telem_record | def _make_telem_record(self) -> pb.Record:
feature = telem_pb.Feature()
feature.importer_mlflow = True
telem = telem_pb.TelemetryRecord()
telem.feature.CopyFrom(feature)
telem.python_version = platform.python_version() # importer's python version
telem.cli_version = wan... | python | wandb/apis/importers/base.py | 212 | 220 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,789 | _make_metadata_file | def _make_metadata_file(self, run_dir: str) -> None:
missing_text = "MLFlow did not capture this info."
d = {}
if self.os_version() is not None:
d["os"] = self.os_version()
else:
d["os"] = missing_text
if self.python_version() is not None:
d[... | python | wandb/apis/importers/base.py | 222 | 261 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,790 | download_all_runs | def download_all_runs(self) -> Iterable[ImporterRun]:
... | python | wandb/apis/importers/base.py | 266 | 267 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,791 | import_all | def import_all(self, overrides: Optional[Dict[str, Any]] = None) -> None:
for run in tqdm(self.download_all_runs(), desc="Sending runs"):
self.import_one(run, overrides) | python | wandb/apis/importers/base.py | 269 | 271 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,792 | import_all_parallel | def import_all_parallel(
self, overrides: Optional[Dict[str, Any]] = None, **pool_kwargs: Any
) -> None:
runs = list(self.download_all_runs())
with tqdm(total=len(runs)) as pbar:
with ProcessPoolExecutor(**pool_kwargs) as exc:
futures = {
exc.s... | python | wandb/apis/importers/base.py | 273 | 288 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,793 | import_one | def import_one(
self,
run: ImporterRun,
overrides: Optional[Dict[str, Any]] = None,
) -> None:
# does this need to be here for pmap?
if overrides:
for k, v in overrides.items():
# `lambda: v` won't work!
# https://stackoverflow.com/... | python | wandb/apis/importers/base.py | 290 | 301 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,794 | _import_one | def _import_one(self, run: ImporterRun) -> None:
with send_manager(run.run_dir) as sm:
sm.send(run._make_run_record())
sm.send(run._make_summary_record())
sm.send(run._make_metadata_files_record())
for history_record in run._make_history_records():
... | python | wandb/apis/importers/base.py | 303 | 312 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,795 | view_type | def view_type(self) -> str:
return "UNKNOWN PANEL" | python | wandb/apis/reports/_panels.py | 21 | 22 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,796 | __init__ | def __init__(
self,
title: Optional[str] = None,
x: Optional[str] = None,
y: Optional[Union[list, str]] = None,
range_x: Union[list, tuple] = (None, None),
range_y: Union[list, tuple] = (None, None),
log_x: Optional[bool] = None,
log_y: Optional[bool] = No... | python | wandb/apis/reports/_panels.py | 125 | 186 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,797 | x | def x(self):
json_path = self._get_path("x")
value = nested_get(self, json_path)
return self.panel_metrics_helper.back_to_front(value) | python | wandb/apis/reports/_panels.py | 189 | 192 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,798 | x | def x(self, value):
if value is None:
value = "Step"
json_path = self._get_path("x")
value = self.panel_metrics_helper.front_to_back(value)
nested_set(self, json_path, value) | python | wandb/apis/reports/_panels.py | 195 | 201 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,799 | y | def y(self):
json_path = self._get_path("y")
value = nested_get(self, json_path)
if value is None:
return value
return [self.panel_metrics_helper.back_to_front(v) for v in value] | python | wandb/apis/reports/_panels.py | 204 | 209 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,800 | y | def y(self, value):
json_path = self._get_path("y")
if value is not None:
if not isinstance(value, list):
value = [value]
value = [self.panel_metrics_helper.front_to_back(v) for v in value]
nested_set(self, json_path, value) | python | wandb/apis/reports/_panels.py | 212 | 218 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.