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,601 | __iter__ | def __iter__(self):
self.page_offset = self.min_step
self.scan_offset = 0
self.rows = []
return self | python | wandb/apis/public.py | 3,496 | 3,500 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,602 | __next__ | def __next__(self):
while True:
if self.scan_offset < len(self.rows):
row = self.rows[self.scan_offset]
self.scan_offset += 1
return row
if self.page_offset >= self.max_step:
raise StopIteration()
self._load_next... | python | wandb/apis/public.py | 3,502 | 3,510 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,603 | _load_next | def _load_next(self):
max_step = self.page_offset + self.page_size
if max_step > self.max_step:
max_step = self.max_step
variables = {
"entity": self.run.entity,
"project": self.run.project,
"run": self.run.id,
"minStep": int(self.page_... | python | wandb/apis/public.py | 3,519 | 3,536 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,604 | __init__ | def __init__(self, client, run, keys, min_step, max_step, page_size=1000):
self.client = client
self.run = run
self.keys = keys
self.page_size = page_size
self.min_step = min_step
self.max_step = max_step
self.page_offset = min_step # minStep for next page
... | python | wandb/apis/public.py | 3,552 | 3,561 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,605 | __iter__ | def __iter__(self):
self.page_offset = self.min_step
self.scan_offset = 0
self.rows = []
return self | python | wandb/apis/public.py | 3,563 | 3,567 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,606 | __next__ | def __next__(self):
while True:
if self.scan_offset < len(self.rows):
row = self.rows[self.scan_offset]
self.scan_offset += 1
return row
if self.page_offset >= self.max_step:
raise StopIteration()
self._load_next... | python | wandb/apis/public.py | 3,569 | 3,577 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,607 | _load_next | def _load_next(self):
max_step = self.page_offset + self.page_size
if max_step > self.max_step:
max_step = self.max_step
variables = {
"entity": self.run.entity,
"project": self.run.project,
"run": self.run.id,
"spec": json.dumps(
... | python | wandb/apis/public.py | 3,586 | 3,608 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,608 | __init__ | def __init__(
self,
client: Client,
entity: str,
project: str,
name: Optional[str] = None,
per_page: Optional[int] = 50,
):
self.entity = entity
self.project = project
variable_values = {
"entityName": entity,
"projectN... | python | wandb/apis/public.py | 3,630 | 3,646 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,609 | length | def length(self):
# TODO
return None | python | wandb/apis/public.py | 3,649 | 3,651 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,610 | more | def more(self):
if self.last_response:
return self.last_response["project"]["artifactTypes"]["pageInfo"][
"hasNextPage"
]
else:
return True | python | wandb/apis/public.py | 3,654 | 3,660 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,611 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["artifactTypes"]["edges"][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 3,663 | 3,667 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,612 | update_variables | def update_variables(self):
self.variables.update({"cursor": self.cursor}) | python | wandb/apis/public.py | 3,669 | 3,670 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,613 | convert_objects | def convert_objects(self):
if self.last_response["project"] is None:
return []
return [
ArtifactType(
self.client, self.entity, self.project, r["node"]["name"], r["node"]
)
for r in self.last_response["project"]["artifactTypes"]["edges"]
... | python | wandb/apis/public.py | 3,672 | 3,680 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,614 | server_supports_artifact_collections_gql_edges | def server_supports_artifact_collections_gql_edges(
client: RetryingClient, warn: bool = False
) -> bool:
# TODO: Validate this version
# Edges were merged into core on Mar 2, 2022: https://github.com/wandb/core/commit/81c90b29eaacfe0a96dc1ebd83c53560ca763e8b
# CLI version was bumped to "0.12.11" on Mar... | python | wandb/apis/public.py | 3,683 | 3,695 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,615 | artifact_collection_edge_name | def artifact_collection_edge_name(server_supports_artifact_collections: bool) -> str:
return (
"artifactCollection"
if server_supports_artifact_collections
else "artifactSequence"
) | python | wandb/apis/public.py | 3,698 | 3,703 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,616 | artifact_collection_plural_edge_name | def artifact_collection_plural_edge_name(
server_supports_artifact_collections: bool,
) -> str:
return (
"artifactCollections"
if server_supports_artifact_collections
else "artifactSequences"
) | python | wandb/apis/public.py | 3,706 | 3,713 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,617 | __init__ | def __init__(
self,
client: Client,
entity: str,
project: str,
type_name: str,
per_page: Optional[int] = 50,
):
self.entity = entity
self.project = project
self.type_name = type_name
variable_values = {
"entityName": entity... | python | wandb/apis/public.py | 3,717 | 3,770 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,618 | length | def length(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollections"][
"totalCount"
]
else:
return None | python | wandb/apis/public.py | 3,773 | 3,779 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,619 | more | def more(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollections"][
"pageInfo"
]["hasNextPage"]
else:
return True | python | wandb/apis/public.py | 3,782 | 3,788 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,620 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["artifactType"]["artifactCollections"][
"edges"
][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 3,791 | 3,797 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,621 | update_variables | def update_variables(self):
self.variables.update({"cursor": self.cursor}) | python | wandb/apis/public.py | 3,799 | 3,800 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,622 | convert_objects | def convert_objects(self):
return [
ArtifactCollection(
self.client,
self.entity,
self.project,
r["node"]["name"],
self.type_name,
)
for r in self.last_response["project"]["artifactType"][
... | python | wandb/apis/public.py | 3,802 | 3,814 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,623 | __init__ | def __init__(
self, client: Client, run: "Run", mode="logged", per_page: Optional[int] = 50
):
self.run = run
if mode == "logged":
self.run_key = "outputArtifacts"
self.QUERY = self.OUTPUT_QUERY
elif mode == "used":
self.run_key = "inputArtifacts"
... | python | wandb/apis/public.py | 3,874 | 3,893 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,624 | length | def length(self):
if self.last_response:
return self.last_response["project"]["run"][self.run_key]["totalCount"]
else:
return None | python | wandb/apis/public.py | 3,896 | 3,900 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,625 | more | def more(self):
if self.last_response:
return self.last_response["project"]["run"][self.run_key]["pageInfo"][
"hasNextPage"
]
else:
return True | python | wandb/apis/public.py | 3,903 | 3,909 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,626 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["run"][self.run_key]["edges"][-1][
"cursor"
]
else:
return None | python | wandb/apis/public.py | 3,912 | 3,918 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,627 | convert_objects | def convert_objects(self):
return [
Artifact(
self.client,
self.run.entity,
self.run.project,
"{}:v{}".format(
r["node"]["artifactSequence"]["name"], r["node"]["versionIndex"]
),
r["no... | python | wandb/apis/public.py | 3,920 | 3,932 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,628 | __init__ | def __init__(
self,
client: Client,
entity: str,
project: str,
type_name: str,
attrs: Optional[Mapping[str, Any]] = None,
):
self.client = client
self.entity = entity
self.project = project
self.type = type_name
self._attrs = at... | python | wandb/apis/public.py | 3,936 | 3,950 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,629 | load | def load(self):
query = gql(
"""
query ProjectArtifactType(
$entityName: String!,
$projectName: String!,
$artifactTypeName: String!
) {
project(name: $projectName, entityName: $entityName) {
artifactType(name: $artifactT... | python | wandb/apis/public.py | 3,952 | 3,986 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,630 | id | def id(self):
return self._attrs["id"] | python | wandb/apis/public.py | 3,989 | 3,990 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,631 | name | def name(self):
return self._attrs["name"] | python | wandb/apis/public.py | 3,993 | 3,994 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,632 | collections | def collections(self, per_page=50):
"""Artifact collections."""
return ProjectArtifactCollections(
self.client, self.entity, self.project, self.type
) | python | wandb/apis/public.py | 3,997 | 4,001 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,633 | collection | def collection(self, name):
return ArtifactCollection(
self.client, self.entity, self.project, name, self.type
) | python | wandb/apis/public.py | 4,003 | 4,006 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,634 | __repr__ | def __repr__(self):
return f"<ArtifactType {self.type}>" | python | wandb/apis/public.py | 4,008 | 4,009 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,635 | __init__ | def __init__(
self,
client: Client,
entity: str,
project: str,
name: str,
type: str,
attrs: Optional[Mapping[str, Any]] = None,
):
self.client = client
self.entity = entity
self.project = project
self.name = name
self.ty... | python | wandb/apis/public.py | 4,013 | 4,030 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,636 | id | def id(self):
return self._attrs["id"] | python | wandb/apis/public.py | 4,033 | 4,034 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,637 | versions | def versions(self, per_page=50):
"""Artifact versions."""
return ArtifactVersions(
self.client,
self.entity,
self.project,
self.name,
self.type,
per_page=per_page,
) | python | wandb/apis/public.py | 4,037 | 4,046 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,638 | aliases | def aliases(self):
"""Artifact Collection Aliases."""
return self._aliases | python | wandb/apis/public.py | 4,049 | 4,051 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,639 | load | def load(self):
query = gql(
"""
query ArtifactCollection(
$entityName: String!,
$projectName: String!,
$artifactTypeName: String!,
$artifactCollectionName: String!,
$cursor: String,
$perPage: Int = 1000
) {
... | python | wandb/apis/public.py | 4,053 | 4,109 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,640 | __repr__ | def __repr__(self):
return f"<ArtifactCollection {self.name} ({self.type})>" | python | wandb/apis/public.py | 4,111 | 4,112 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,641 | __init__ | def __init__(
self,
name: str,
entry: "artifacts.ArtifactManifestEntry",
parent_artifact: "Artifact",
):
super().__init__(
path=entry.path,
digest=entry.digest,
ref=entry.ref,
birth_artifact_id=entry.birth_artifact_id,
... | python | wandb/apis/public.py | 4,116 | 4,132 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,642 | parent_artifact | def parent_artifact(self):
return self._parent_artifact | python | wandb/apis/public.py | 4,134 | 4,135 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,643 | copy | def copy(self, cache_path, target_path):
raise NotImplementedError() | python | wandb/apis/public.py | 4,137 | 4,138 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,644 | download | def download(self, root=None):
root = root or self._parent_artifact._default_root()
dest_path = os.path.join(root, self.name)
self._parent_artifact._add_download_root(root)
manifest = self._parent_artifact._load_manifest()
# Skip checking the cache (and possibly downloading) if... | python | wandb/apis/public.py | 4,140 | 4,158 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,645 | ref_target | def ref_target(self):
manifest = self._parent_artifact._load_manifest()
if self.ref is not None:
return manifest.storage_policy.load_reference(
manifest.entries[self.name],
local=False,
)
raise ValueError("Only reference entries support ref... | python | wandb/apis/public.py | 4,160 | 4,167 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,646 | ref_url | def ref_url(self):
return (
"wandb-artifact://"
+ b64_to_hex_id(self._parent_artifact.id)
+ "/"
+ self.name
) | python | wandb/apis/public.py | 4,169 | 4,175 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,647 | __init__ | def __init__(
self,
nfiles: int,
clock_for_testing: Callable[[], float] = time.monotonic,
termlog_for_testing=termlog,
) -> None:
self._nfiles = nfiles
self._clock = clock_for_testing
self._termlog = termlog_for_testing
self._n_files_downloaded = 0
... | python | wandb/apis/public.py | 4,179 | 4,192 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,648 | notify_downloaded | def notify_downloaded(self) -> None:
with self._lock:
self._n_files_downloaded += 1
if self._n_files_downloaded == self._nfiles:
self._termlog(
f" {self._nfiles} of {self._nfiles} files downloaded. ",
# ^ trailing spaces to wipe o... | python | wandb/apis/public.py | 4,194 | 4,211 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,649 | from_id | def from_id(cls, artifact_id: str, client: Client):
artifact = artifacts.get_artifacts_cache().get_artifact(artifact_id)
if artifact is not None:
return artifact
response: Mapping[str, Any] = client.execute(
Artifact.QUERY,
variable_values={"id": artifact_id},... | python | wandb/apis/public.py | 4,299 | 4,345 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,650 | __init__ | def __init__(self, client, entity, project, name, attrs=None):
self.client = client
self._entity = entity
self._project = project
self._artifact_name = name
self._artifact_collection_name = name.split(":")[0]
self._attrs = attrs
if self._attrs is None:
... | python | wandb/apis/public.py | 4,347 | 4,386 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,651 | id | def id(self):
return self._attrs["id"] | python | wandb/apis/public.py | 4,389 | 4,390 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,652 | file_count | def file_count(self):
return self._attrs["fileCount"] | python | wandb/apis/public.py | 4,393 | 4,394 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,653 | source_version | def source_version(self):
"""The artifact's version index under its parent artifact collection.
A string with the format "v{number}".
"""
return f"v{self._sequence_version_index}" | python | wandb/apis/public.py | 4,397 | 4,402 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,654 | version | def version(self):
"""The artifact's version index under the given artifact collection.
A string with the format "v{number}".
"""
for a in self._attrs["aliases"]:
if a[
"artifactCollectionName"
] == self._artifact_collection_name and util.alias_is... | python | wandb/apis/public.py | 4,405 | 4,417 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,655 | entity | def entity(self):
return self._entity | python | wandb/apis/public.py | 4,420 | 4,421 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,656 | project | def project(self):
return self._project | python | wandb/apis/public.py | 4,424 | 4,425 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,657 | metadata | def metadata(self):
return self._metadata | python | wandb/apis/public.py | 4,428 | 4,429 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,658 | metadata | def metadata(self, metadata):
self._metadata = metadata | python | wandb/apis/public.py | 4,432 | 4,433 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,659 | manifest | def manifest(self):
return self._load_manifest() | python | wandb/apis/public.py | 4,436 | 4,437 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,660 | digest | def digest(self):
return self._attrs["digest"] | python | wandb/apis/public.py | 4,440 | 4,441 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,661 | state | def state(self):
return self._attrs["state"] | python | wandb/apis/public.py | 4,444 | 4,445 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,662 | size | def size(self):
return self._attrs["size"] | python | wandb/apis/public.py | 4,448 | 4,449 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,663 | created_at | def created_at(self):
"""The time at which the artifact was created."""
return self._attrs["createdAt"] | python | wandb/apis/public.py | 4,452 | 4,454 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,664 | updated_at | def updated_at(self):
"""The time at which the artifact was last updated."""
return self._attrs["updatedAt"] or self._attrs["createdAt"] | python | wandb/apis/public.py | 4,457 | 4,459 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,665 | description | def description(self):
return self._description | python | wandb/apis/public.py | 4,462 | 4,463 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,666 | description | def description(self, desc):
self._description = desc | python | wandb/apis/public.py | 4,466 | 4,467 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,667 | type | def type(self):
return self._attrs["artifactType"]["name"] | python | wandb/apis/public.py | 4,470 | 4,471 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,668 | commit_hash | def commit_hash(self):
return self._attrs.get("commitHash", "") | python | wandb/apis/public.py | 4,474 | 4,475 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,669 | name | def name(self):
if self._sequence_version_index is None:
return self.digest
return f"{self._sequence_name}:v{self._sequence_version_index}" | python | wandb/apis/public.py | 4,478 | 4,481 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,670 | aliases | def aliases(self):
"""The aliases associated with this artifact.
Returns:
List[str]: The aliases associated with this artifact.
"""
return self._aliases | python | wandb/apis/public.py | 4,484 | 4,491 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,671 | aliases | def aliases(self, aliases):
for alias in aliases:
if any(char in alias for char in ["/", ":"]):
raise ValueError(
'Invalid alias "%s", slashes and colons are disallowed' % alias
)
self._aliases = aliases | python | wandb/apis/public.py | 4,494 | 4,500 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,672 | expected_type | def expected_type(client, name, entity_name, project_name):
"""Returns the expected type for a given artifact name and project."""
query = gql(
"""
query ArtifactType(
$entityName: String,
$projectName: String,
$name: String!
) {
... | python | wandb/apis/public.py | 4,503 | 4,542 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,673 | _use_as | def _use_as(self):
return self._attrs.get("_use_as") | python | wandb/apis/public.py | 4,545 | 4,546 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,674 | _use_as | def _use_as(self, use_as):
self._attrs["_use_as"] = use_as
return use_as | python | wandb/apis/public.py | 4,549 | 4,551 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,675 | link | def link(self, target_path: str, aliases=None):
if ":" in target_path:
raise ValueError(
f"target_path {target_path} cannot contain `:` because it is not an alias."
)
portfolio, project, entity = util._parse_entity_project_item(target_path)
aliases = util... | python | wandb/apis/public.py | 4,554 | 4,594 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,676 | delete | def delete(self, delete_aliases=False):
"""Delete an artifact and its files.
Examples:
Delete all the "model" artifacts a run has logged:
```
runs = api.runs(path="my_entity/my_project")
for run in runs:
for artifact in run.logged_artifact... | python | wandb/apis/public.py | 4,597 | 4,635 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,677 | new_file | def new_file(self, name, mode=None):
raise ValueError("Cannot add files to an artifact once it has been saved") | python | wandb/apis/public.py | 4,637 | 4,638 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,678 | add_file | def add_file(self, local_path, name=None, is_tmp=False):
raise ValueError("Cannot add files to an artifact once it has been saved") | python | wandb/apis/public.py | 4,640 | 4,641 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,679 | add_dir | def add_dir(self, path, name=None):
raise ValueError("Cannot add files to an artifact once it has been saved") | python | wandb/apis/public.py | 4,643 | 4,644 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,680 | add_reference | def add_reference(self, uri, name=None, checksum=True, max_objects=None):
raise ValueError("Cannot add files to an artifact once it has been saved") | python | wandb/apis/public.py | 4,646 | 4,647 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,681 | add | def add(self, obj, name):
raise ValueError("Cannot add files to an artifact once it has been saved") | python | wandb/apis/public.py | 4,649 | 4,650 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,682 | _add_download_root | def _add_download_root(self, dir_path):
"""Make `dir_path` a root directory for this artifact."""
self._download_roots.add(os.path.abspath(dir_path)) | python | wandb/apis/public.py | 4,652 | 4,654 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,683 | _is_download_root | def _is_download_root(self, dir_path):
"""Determine if `dir_path` is a root directory for this artifact."""
return dir_path in self._download_roots | python | wandb/apis/public.py | 4,656 | 4,658 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,684 | _local_path_to_name | def _local_path_to_name(self, file_path):
"""Convert a local file path to a path entry in the artifact."""
abs_file_path = os.path.abspath(file_path)
abs_file_parts = abs_file_path.split(os.sep)
for i in range(len(abs_file_parts) + 1):
if self._is_download_root(os.path.join(o... | python | wandb/apis/public.py | 4,660 | 4,667 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,685 | _get_obj_entry | def _get_obj_entry(self, name):
"""Return an object entry by name, handling any type suffixes.
When objects are added with `.add(obj, name)`, the name is typically changed to
include the suffix of the object type when serializing to JSON. So we need to be
able to resolve a name, without... | python | wandb/apis/public.py | 4,669 | 4,689 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,686 | get_path | def get_path(self, name):
manifest = self._load_manifest()
entry = manifest.entries.get(name)
if entry is None:
entry = self._get_obj_entry(name)[0]
if entry is None:
raise KeyError("Path not contained in artifact: %s" % name)
else:
... | python | wandb/apis/public.py | 4,691 | 4,701 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,687 | get | def get(self, name):
entry, wb_class = self._get_obj_entry(name)
if entry is not None:
# If the entry is a reference from another artifact, then get it directly from that artifact
if self._manifest_entry_is_artifact_reference(entry):
artifact = self._get_ref_artif... | python | wandb/apis/public.py | 4,703 | 4,729 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,688 | download | def download(self, root=None, recursive=False):
dirpath = root or self._default_root()
self._add_download_root(dirpath)
manifest = self._load_manifest()
nfiles = len(manifest.entries)
size = sum(e.size for e in manifest.entries.values())
log = False
if nfiles > 50... | python | wandb/apis/public.py | 4,731 | 4,774 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,689 | checkout | def checkout(self, root=None):
dirpath = root or self._default_root(include_version=False)
for root, _, files in os.walk(dirpath):
for file in files:
full_path = os.path.join(root, file)
artifact_path = util.to_forward_slash_path(
os.path.... | python | wandb/apis/public.py | 4,776 | 4,791 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,690 | verify | def verify(self, root=None):
dirpath = root or self._default_root()
manifest = self._load_manifest()
ref_count = 0
for root, _, files in os.walk(dirpath):
for file in files:
full_path = os.path.join(root, file)
artifact_path = util.to_forward_... | python | wandb/apis/public.py | 4,793 | 4,820 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,691 | file | def file(self, root=None):
"""Download a single file artifact to dir specified by the root.
Arguments:
root: (str, optional) The root directory in which to place the file. Defaults to './artifacts/self.name/'.
Returns:
(str): The full path of the downloaded file.
... | python | wandb/apis/public.py | 4,822 | 4,842 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,692 | _download_file | def _download_file(
self, name, root, download_logger: Optional[_ArtifactDownloadLogger] = None
):
# download file into cache and copy to target dir
downloaded_path = self.get_path(name).download(root)
if download_logger is not None:
download_logger.notify_downloaded()
... | python | wandb/apis/public.py | 4,844 | 4,851 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,693 | _default_root | def _default_root(self, include_version=True):
root = (
os.path.join(".", "artifacts", self.name)
if include_version
else os.path.join(".", "artifacts", self._sequence_name)
)
if platform.system() == "Windows":
head, tail = os.path.splitdrive(root)... | python | wandb/apis/public.py | 4,853 | 4,862 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,694 | json_encode | def json_encode(self):
return util.artifact_to_json(self) | python | wandb/apis/public.py | 4,864 | 4,865 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,695 | save | def save(self):
"""Persists artifact changes to the wandb backend."""
mutation = gql(
"""
mutation updateArtifact(
$artifactID: ID!,
$description: String,
$metadata: JSONString,
$aliases: [ArtifactAliasInput!]
) {
up... | python | wandb/apis/public.py | 4,868 | 4,930 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,696 | wait | def wait(self):
return self | python | wandb/apis/public.py | 4,932 | 4,933 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,697 | _save_alias_changes | def _save_alias_changes(self):
"""Persist alias changes on this artifact to the wandb backend.
Called by artifact.save().
"""
aliases_to_add = set(self._aliases) - set(self._frozen_aliases)
aliases_to_remove = set(self._frozen_aliases) - set(self._aliases)
# Introspect
... | python | wandb/apis/public.py | 4,936 | 5,032 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,698 | _list | def _list(self):
manifest = self._load_manifest()
return manifest.entries.keys() | python | wandb/apis/public.py | 5,035 | 5,037 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,699 | __repr__ | def __repr__(self):
return f"<Artifact {self.id}>" | python | wandb/apis/public.py | 5,039 | 5,040 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,700 | _load | def _load(self):
query = gql(
"""
query Artifact(
$entityName: String,
$projectName: String,
$name: String!
) {
project(name: $projectName, entityName: $entityName) {
artifact(name: $name) {
...Artifa... | python | wandb/apis/public.py | 5,042 | 5,087 | {
"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.