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,501 | _sampled_history | def _sampled_history(self, keys, x_axis="_step", samples=500):
spec = {"keys": [x_axis] + keys, "samples": samples}
query = gql(
"""
query RunSampledHistory($project: String!, $entity: String!, $name: String!, $specs: [JSONString!]!) {
project(name: $project, entityName: ... | python | wandb/apis/public.py | 1,964 | 1,978 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,502 | _full_history | def _full_history(self, samples=500, stream="default"):
node = "history" if stream == "default" else "events"
query = gql(
"""
query RunFullHistory($project: String!, $entity: String!, $name: String!, $samples: Int) {
project(name: $project, entityName: $entity) {
... | python | wandb/apis/public.py | 1,980 | 1,994 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,503 | files | def files(self, names=None, per_page=50):
"""Return a file path for each file named.
Arguments:
names (list): names of the requested files, if empty returns all files
per_page (int): number of results per page.
Returns:
A `Files` object, which is an iterator... | python | wandb/apis/public.py | 1,997 | 2,007 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,504 | file | def file(self, name):
"""Return the path of a file with a given name in the artifact.
Arguments:
name (str): name of requested file.
Returns:
A `File` matching the name argument.
"""
return Files(self.client, self, [name])[0] | python | wandb/apis/public.py | 2,010 | 2,019 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,505 | upload_file | def upload_file(self, path, root="."):
"""Upload a file.
Arguments:
path (str): name of file to upload.
root (str): the root path to save the file relative to. i.e.
If you want to have the file saved in the run as "my_dir/file.txt"
and you're cur... | python | wandb/apis/public.py | 2,022 | 2,043 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,506 | history | def history(
self, samples=500, keys=None, x_axis="_step", pandas=True, stream="default"
):
"""Return sampled history metrics for a run.
This is simpler and faster if you are ok with the history records being sampled.
Arguments:
samples : (int, optional) The number of s... | python | wandb/apis/public.py | 2,046 | 2,085 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,507 | scan_history | def scan_history(self, keys=None, page_size=1000, min_step=None, max_step=None):
"""Returns an iterable collection of all history records for a run.
Example:
Export all the loss values for an example run
```python
run = api.run("l2k2/examples-numpy-boston/i0wt6xua")... | python | wandb/apis/public.py | 2,088 | 2,140 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,508 | logged_artifacts | def logged_artifacts(self, per_page=100):
return RunArtifacts(self.client, self, mode="logged", per_page=per_page) | python | wandb/apis/public.py | 2,143 | 2,144 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,509 | used_artifacts | def used_artifacts(self, per_page=100):
return RunArtifacts(self.client, self, mode="used", per_page=per_page) | python | wandb/apis/public.py | 2,147 | 2,148 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,510 | use_artifact | def use_artifact(self, artifact, use_as=None):
"""Declare an artifact as an input to a run.
Arguments:
artifact (`Artifact`): An artifact returned from
`wandb.Api().artifact(name)`
use_as (string, optional): A string identifying
how the artifact i... | python | wandb/apis/public.py | 2,151 | 2,181 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,511 | log_artifact | def log_artifact(self, artifact, aliases=None):
"""Declare an artifact as output of a run.
Arguments:
artifact (`Artifact`): An artifact returned from
`wandb.Api().artifact(name)`
aliases (list, optional): Aliases to apply to this artifact
Returns:
... | python | wandb/apis/public.py | 2,184 | 2,215 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,512 | summary | def summary(self):
if self._summary is None:
from wandb.old.summary import HTTPSummary
# TODO: fix the outdir issue
self._summary = HTTPSummary(self, self.client, summary=self.summary_metrics)
return self._summary | python | wandb/apis/public.py | 2,218 | 2,224 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,513 | path | def path(self):
return [
urllib.parse.quote_plus(str(self.entity)),
urllib.parse.quote_plus(str(self.project)),
urllib.parse.quote_plus(str(self.id)),
] | python | wandb/apis/public.py | 2,227 | 2,232 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,514 | url | def url(self):
path = self.path
path.insert(2, "runs")
return self.client.app_url + "/".join(path) | python | wandb/apis/public.py | 2,235 | 2,238 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,515 | lastHistoryStep | def lastHistoryStep(self): # noqa: N802
query = gql(
"""
query RunHistoryKeys($project: String!, $entity: String!, $name: String!) {
project(name: $project, entityName: $entity) {
run(name: $name) { historyKeys }
}
}
"""
)
... | python | wandb/apis/public.py | 2,241 | 2,260 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,516 | to_html | def to_html(self, height=420, hidden=False):
"""Generate HTML containing an iframe displaying this run."""
url = self.url + "?jupyter=true"
style = f"border:none;width:100%;height:{height}px;"
prefix = ""
if hidden:
style += "display:none;"
prefix = ipytho... | python | wandb/apis/public.py | 2,262 | 2,270 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,517 | _repr_html_ | def _repr_html_(self) -> str:
return self.to_html() | python | wandb/apis/public.py | 2,272 | 2,273 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,518 | __repr__ | def __repr__(self):
return "<Run {} ({})>".format("/".join(self.path), self.state) | python | wandb/apis/public.py | 2,275 | 2,276 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,519 | __init__ | def __init__(
self,
client,
entity,
project,
queue_name,
run_queue_item_id,
container_job=False,
project_queue=LAUNCH_DEFAULT_PROJECT,
):
self.client = client
self._entity = entity
self._project = project
self._queue_nam... | python | wandb/apis/public.py | 2,282 | 2,300 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,520 | queue_name | def queue_name(self):
return self._queue_name | python | wandb/apis/public.py | 2,303 | 2,304 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,521 | id | def id(self):
return self._run_queue_item_id | python | wandb/apis/public.py | 2,307 | 2,308 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,522 | project | def project(self):
return self._project | python | wandb/apis/public.py | 2,311 | 2,312 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,523 | entity | def entity(self):
return self._entity | python | wandb/apis/public.py | 2,315 | 2,316 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,524 | state | def state(self):
item = self._get_item()
if item:
return item["state"].lower()
raise ValueError(
f"Could not find QueuedRunItem associated with id: {self.id} on queue {self.queue_name} at itemId: {self.id}"
) | python | wandb/apis/public.py | 2,319 | 2,326 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,525 | _get_run_queue_item_legacy | def _get_run_queue_item_legacy(self) -> Dict:
query = gql(
"""
query GetRunQueueItem($projectName: String!, $entityName: String!, $runQueue: String!) {
project(name: $projectName, entityName: $entityName) {
runQueue(name:$runQueue) {
... | python | wandb/apis/public.py | 2,329 | 2,358 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,526 | _get_item | def _get_item(self):
query = gql(
"""
query GetRunQueueItem($projectName: String!, $entityName: String!, $runQueue: String!, $itemId: ID!) {
project(name: $projectName, entityName: $entityName) {
runQueue(name: $runQueue) {
runQ... | python | wandb/apis/public.py | 2,361 | 2,391 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,527 | wait_until_finished | def wait_until_finished(self):
if not self._run:
self.wait_until_running()
self._run.wait_until_finished()
# refetch run to get updated summary
self._run.load(force=True)
return self._run | python | wandb/apis/public.py | 2,394 | 2,401 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,528 | delete | def delete(self, delete_artifacts=False):
"""Delete the given queued run from the wandb backend."""
query = gql(
"""
query fetchRunQueuesFromProject($entityName: String!, $projectName: String!, $runQueueName: String!) {
project(name: $projectName, entityName: $ent... | python | wandb/apis/public.py | 2,404 | 2,452 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,529 | wait_until_running | def wait_until_running(self):
if self._run is not None:
return self._run
if self.container_job:
raise LaunchError("Container jobs cannot be waited on")
while True:
# sleep here to hide an ugly warning
time.sleep(2)
item = self._get_ite... | python | wandb/apis/public.py | 2,455 | 2,481 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,530 | __repr__ | def __repr__(self):
return f"<QueuedRun {self.queue_name} ({self.id})" | python | wandb/apis/public.py | 2,483 | 2,484 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,531 | __init__ | def __init__(self, client, entity, project, sweep_id, attrs=None):
# TODO: Add agents / flesh this out.
super().__init__(dict(attrs or {}))
self.client = client
self._entity = entity
self.project = project
self.id = sweep_id
self.runs = []
self.load(force... | python | wandb/apis/public.py | 2,539 | 2,548 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,532 | entity | def entity(self):
return self._entity | python | wandb/apis/public.py | 2,551 | 2,552 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,533 | username | def username(self):
wandb.termwarn("Sweep.username is deprecated. please use Sweep.entity instead.")
return self._entity | python | wandb/apis/public.py | 2,555 | 2,557 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,534 | config | def config(self):
return util.load_yaml(self._attrs["config"]) | python | wandb/apis/public.py | 2,560 | 2,561 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,535 | load | def load(self, force: bool = False):
if force or not self._attrs:
sweep = self.get(self.client, self.entity, self.project, self.id)
if sweep is None:
raise ValueError("Could not find sweep %s" % self)
self._attrs = sweep._attrs
self.runs = sweep.ru... | python | wandb/apis/public.py | 2,563 | 2,571 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,536 | order | def order(self):
if self._attrs.get("config") and self.config.get("metric"):
sort_order = self.config["metric"].get("goal", "minimize")
prefix = "+" if sort_order == "minimize" else "-"
return QueryGenerator.format_order_key(
prefix + self.config["metric"]["na... | python | wandb/apis/public.py | 2,574 | 2,580 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,537 | best_run | def best_run(self, order=None):
"""Return the best run sorted by the metric defined in config or the order passed in."""
if order is None:
order = self.order
else:
order = QueryGenerator.format_order_key(order)
if order is None:
wandb.termwarn(
... | python | wandb/apis/public.py | 2,582 | 2,605 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,538 | expected_run_count | def expected_run_count(self) -> Optional[int]:
"""Return the number of expected runs in the sweep or None for infinite runs."""
return self._attrs.get("runCountExpected") | python | wandb/apis/public.py | 2,608 | 2,610 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,539 | path | def path(self):
return [
urllib.parse.quote_plus(str(self.entity)),
urllib.parse.quote_plus(str(self.project)),
urllib.parse.quote_plus(str(self.id)),
] | python | wandb/apis/public.py | 2,613 | 2,618 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,540 | url | def url(self):
path = self.path
path.insert(2, "sweeps")
return self.client.app_url + "/".join(path) | python | wandb/apis/public.py | 2,621 | 2,624 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,541 | name | def name(self):
return self.config.get("name") or self.id | python | wandb/apis/public.py | 2,627 | 2,628 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,542 | get | def get(
cls,
client,
entity=None,
project=None,
sid=None,
order=None,
query=None,
**kwargs,
):
"""Execute a query against the cloud backend."""
if query is None:
query = cls.QUERY
variables = {
"entity"... | python | wandb/apis/public.py | 2,631 | 2,679 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,543 | to_html | def to_html(self, height=420, hidden=False):
"""Generate HTML containing an iframe displaying this sweep."""
url = self.url + "?jupyter=true"
style = f"border:none;width:100%;height:{height}px;"
prefix = ""
if hidden:
style += "display:none;"
prefix = ipyt... | python | wandb/apis/public.py | 2,681 | 2,689 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,544 | _repr_html_ | def _repr_html_(self) -> str:
return self.to_html() | python | wandb/apis/public.py | 2,691 | 2,692 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,545 | __repr__ | def __repr__(self):
return "<Sweep {} ({})>".format(
"/".join(self.path), self._attrs.get("state", "Unknown State")
) | python | wandb/apis/public.py | 2,694 | 2,697 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,546 | __init__ | def __init__(self, client, run, names=None, per_page=50, upload=False):
self.run = run
variables = {
"project": run.project,
"entity": run.entity,
"name": run.id,
"fileNames": names or [],
"upload": upload,
}
super().__init__(cl... | python | wandb/apis/public.py | 2,719 | 2,728 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,547 | length | def length(self):
if self.last_response:
return self.last_response["project"]["run"]["fileCount"]
else:
return None | python | wandb/apis/public.py | 2,731 | 2,735 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,548 | more | def more(self):
if self.last_response:
return self.last_response["project"]["run"]["files"]["pageInfo"][
"hasNextPage"
]
else:
return True | python | wandb/apis/public.py | 2,738 | 2,744 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,549 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["run"]["files"]["edges"][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 2,747 | 2,751 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,550 | update_variables | def update_variables(self):
self.variables.update({"fileLimit": self.per_page, "fileCursor": self.cursor}) | python | wandb/apis/public.py | 2,753 | 2,754 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,551 | convert_objects | def convert_objects(self):
return [
File(self.client, r["node"])
for r in self.last_response["project"]["run"]["files"]["edges"]
] | python | wandb/apis/public.py | 2,756 | 2,760 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,552 | __repr__ | def __repr__(self):
return "<Files {} ({})>".format("/".join(self.run.path), len(self)) | python | wandb/apis/public.py | 2,762 | 2,763 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,553 | __init__ | def __init__(self, client, attrs):
self.client = client
self._attrs = attrs
super().__init__(dict(attrs)) | python | wandb/apis/public.py | 2,780 | 2,783 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,554 | size | def size(self):
size_bytes = self._attrs["sizeBytes"]
if size_bytes is not None:
return int(size_bytes)
return 0 | python | wandb/apis/public.py | 2,786 | 2,790 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,555 | download | def download(
self, root: str = ".", replace: bool = False, exist_ok: bool = False
) -> io.TextIOWrapper:
"""Downloads a file previously saved by a run from the wandb server.
Arguments:
replace (boolean): If `True`, download will overwrite a local file
if it exis... | python | wandb/apis/public.py | 2,798 | 2,823 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,556 | delete | def delete(self):
mutation = gql(
"""
mutation deleteFiles($files: [ID!]!) {
deleteFiles(input: {
files: $files
}) {
success
}
}
"""
)
self.client.execute(mutation, variable_values={"files": [... | python | wandb/apis/public.py | 2,826 | 2,838 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,557 | __repr__ | def __repr__(self):
return "<File {} ({}) {}>".format(
self.name,
self.mimetype,
util.to_human_size(self.size, units=util.POW_2_BYTES),
) | python | wandb/apis/public.py | 2,840 | 2,845 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,558 | __init__ | def __init__(self, client, project, name=None, entity=None, per_page=50):
self.project = project
self.name = name
variables = {
"project": project.name,
"entity": project.entity,
"viewName": self.name,
}
super().__init__(client, variables, per_... | python | wandb/apis/public.py | 2,884 | 2,892 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,559 | length | def length(self):
# TODO: Add the count the backend
if self.last_response:
return len(self.objects)
else:
return None | python | wandb/apis/public.py | 2,895 | 2,900 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,560 | more | def more(self):
if self.last_response:
return self.last_response["project"]["allViews"]["pageInfo"]["hasNextPage"]
else:
return True | python | wandb/apis/public.py | 2,903 | 2,907 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,561 | cursor | def cursor(self):
if self.last_response:
return self.last_response["project"]["allViews"]["edges"][-1]["cursor"]
else:
return None | python | wandb/apis/public.py | 2,910 | 2,914 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,562 | update_variables | def update_variables(self):
self.variables.update(
{"reportCursor": self.cursor, "reportLimit": self.per_page}
) | python | wandb/apis/public.py | 2,916 | 2,919 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,563 | convert_objects | def convert_objects(self):
if self.last_response["project"] is None:
raise ValueError(
f"Project {self.variables['project']} does not exist under entity {self.variables['entity']}"
)
return [
BetaReport(
self.client,
r["... | python | wandb/apis/public.py | 2,921 | 2,934 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,564 | __repr__ | def __repr__(self):
return "<Reports {}>".format("/".join(self.project.path)) | python | wandb/apis/public.py | 2,936 | 2,937 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,565 | __init__ | def __init__(self):
pass | python | wandb/apis/public.py | 2,958 | 2,959 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,566 | format_order_key | def format_order_key(cls, key: str):
if key.startswith("+") or key.startswith("-"):
direction = key[0]
key = key[1:]
else:
direction = "-"
parts = key.split(".")
if len(parts) == 1:
# Assume the user meant summary_metrics if not a run colum... | python | wandb/apis/public.py | 2,962 | 2,977 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,567 | _is_group | def _is_group(self, op):
return op.get("filters") is not None | python | wandb/apis/public.py | 2,979 | 2,980 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,568 | _is_individual | def _is_individual(self, op):
return op.get("key") is not None | python | wandb/apis/public.py | 2,982 | 2,983 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,569 | _to_mongo_op_value | def _to_mongo_op_value(self, op, value):
if op == "=":
return value
else:
return {self.INDIVIDUAL_OP_TO_MONGO[op]: value} | python | wandb/apis/public.py | 2,985 | 2,989 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,570 | key_to_server_path | def key_to_server_path(self, key):
if key["section"] == "config":
return "config." + key["name"]
elif key["section"] == "summary":
return "summary_metrics." + key["name"]
elif key["section"] == "keys_info":
return "keys_info.keys." + key["name"]
elif k... | python | wandb/apis/public.py | 2,991 | 3,002 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,571 | server_path_to_key | def server_path_to_key(self, path):
if path.startswith("config."):
return {"section": "config", "name": path.split("config.", 1)[1]}
elif path.startswith("summary_metrics."):
return {"section": "summary", "name": path.split("summary_metrics.", 1)[1]}
elif path.startswith(... | python | wandb/apis/public.py | 3,004 | 3,014 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,572 | keys_to_order | def keys_to_order(self, keys):
orders = []
for key in keys["keys"]:
order = self.key_to_server_path(key["key"])
if key.get("ascending"):
order = "+" + order
else:
order = "-" + order
orders.append(order)
# return ","... | python | wandb/apis/public.py | 3,016 | 3,026 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,573 | order_to_keys | def order_to_keys(self, order):
keys = []
for k in order: # orderstr.split(","):
name = k[1:]
if k[0] == "+":
ascending = True
elif k[0] == "-":
ascending = False
else:
raise Exception("you must sort by asce... | python | wandb/apis/public.py | 3,028 | 3,042 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,574 | _to_mongo_individual | def _to_mongo_individual(self, filter):
if filter["key"]["name"] == "":
return None
if filter.get("value") is None and filter["op"] != "=" and filter["op"] != "!=":
return None
if filter.get("disabled") is not None and filter["disabled"]:
return None
... | python | wandb/apis/public.py | 3,044 | 3,066 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,575 | filter_to_mongo | def filter_to_mongo(self, filter):
if self._is_individual(filter):
return self._to_mongo_individual(filter)
elif self._is_group(filter):
return {
self.GROUP_OP_TO_MONGO[filter["op"]]: [
self.filter_to_mongo(f) for f in filter["filters"]
... | python | wandb/apis/public.py | 3,068 | 3,076 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,576 | mongo_to_filter | def mongo_to_filter(self, filter):
# Returns {"op": "OR", "filters": [{"op": "AND", "filters": []}]}
if filter is None:
return None # this covers the case where self.filter_to_mongo returns None.
group_op = None
for key in filter.keys():
# if self.MONGO_TO_GROUP... | python | wandb/apis/public.py | 3,078 | 3,105 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,577 | __init__ | def __init__(self, run_set):
self.run_set = run_set
self.panel_metrics_helper = PanelMetricsHelper() | python | wandb/apis/public.py | 3,167 | 3,169 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,578 | _handle_compare | def _handle_compare(self, node):
# only left side can be a col
left = self.front_to_back(self._handle_fields(node.left))
op = self._handle_ops(node.ops[0])
right = self._handle_fields(node.comparators[0])
# Eq has no op for some reason
if op == "=":
return {l... | python | wandb/apis/public.py | 3,171 | 3,181 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,579 | _handle_fields | def _handle_fields(self, node):
result = getattr(node, self.AST_FIELDS.get(type(node)))
if isinstance(result, list):
return [self._handle_fields(node) for node in result]
elif isinstance(result, str):
return self._unconvert(result)
return result | python | wandb/apis/public.py | 3,183 | 3,189 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,580 | _handle_ops | def _handle_ops(self, node):
return self.AST_OPERATORS.get(type(node)) | python | wandb/apis/public.py | 3,191 | 3,192 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,581 | _replace_numeric_dots | def _replace_numeric_dots(self, s):
numeric_dots = []
for i, (left, mid, right) in enumerate(zip(s, s[1:], s[2:]), 1):
if mid == ".":
if (
left.isdigit()
and right.isdigit() # 1.2
or left.isdigit()
... | python | wandb/apis/public.py | 3,194 | 3,217 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,582 | _convert | def _convert(self, filterstr):
_conversion = (
self._replace_numeric_dots(filterstr) # temporarily sub numeric dots
.replace(".", self.SPACER) # Allow dotted fields
.replace(self.DECIMAL_SPACER, ".") # add them back
)
return "(" + _conversion + ")" | python | wandb/apis/public.py | 3,219 | 3,225 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,583 | _unconvert | def _unconvert(self, field_name):
return field_name.replace(self.SPACER, ".") # Allow dotted fields | python | wandb/apis/public.py | 3,227 | 3,228 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,584 | python_to_mongo | def python_to_mongo(self, filterstr):
try:
tree = ast.parse(self._convert(filterstr), mode="eval")
except SyntaxError as e:
raise ValueError(
"Invalid python comparison expression; form something like `my_col == 123`"
) from e
multiple_filters... | python | wandb/apis/public.py | 3,230 | 3,246 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,585 | front_to_back | def front_to_back(self, name):
name, *rest = name.split(".")
rest = "." + ".".join(rest) if rest else ""
if name in self.FRONTEND_NAME_MAPPING:
return self.FRONTEND_NAME_MAPPING[name]
elif name in self.FRONTEND_NAME_MAPPING_REVERSED:
return name
elif name... | python | wandb/apis/public.py | 3,248 | 3,259 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,586 | back_to_front | def back_to_front(self, name):
if name in self.FRONTEND_NAME_MAPPING_REVERSED:
return self.FRONTEND_NAME_MAPPING_REVERSED[name]
elif name in self.FRONTEND_NAME_MAPPING:
return name
elif (
name.startswith("config.") and ".value" in name
): # may be bri... | python | wandb/apis/public.py | 3,261 | 3,274 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,587 | pc_front_to_back | def pc_front_to_back(self, name):
name, *rest = name.split(".")
rest = "." + ".".join(rest) if rest else ""
if name is None:
return None
elif name in self.panel_metrics_helper.FRONTEND_NAME_MAPPING:
return "summary:" + self.panel_metrics_helper.FRONTEND_NAME_MAPPI... | python | wandb/apis/public.py | 3,277 | 3,291 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,588 | pc_back_to_front | def pc_back_to_front(self, name):
if name is None:
return None
elif "summary:" in name:
name = name.replace("summary:", "")
return self.panel_metrics_helper.FRONTEND_NAME_MAPPING_REVERSED.get(
name, name
)
elif name in self.FRONTEND... | python | wandb/apis/public.py | 3,293 | 3,309 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,589 | front_to_back | def front_to_back(self, name):
if name in self.FRONTEND_NAME_MAPPING:
return self.FRONTEND_NAME_MAPPING[name]
return name | python | wandb/apis/public.py | 3,324 | 3,327 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,590 | back_to_front | def back_to_front(self, name):
if name in self.FRONTEND_NAME_MAPPING_REVERSED:
return self.FRONTEND_NAME_MAPPING_REVERSED[name]
return name | python | wandb/apis/public.py | 3,329 | 3,332 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,591 | special_front_to_back | def special_front_to_back(self, name):
if name is None:
return name
name, *rest = name.split(".")
rest = "." + ".".join(rest) if rest else ""
# special case for config
if name.startswith("c::"):
name = name[3:]
return f"config:{name}.value{re... | python | wandb/apis/public.py | 3,335 | 3,359 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,592 | special_back_to_front | def special_back_to_front(self, name):
if name is not None:
kind, rest = name.split(":", 1)
if kind == "config":
pieces = rest.split(".")
if len(pieces) <= 1:
raise ValueError(f"Invalid name: {name}")
elif len(pieces) =... | python | wandb/apis/public.py | 3,361 | 3,388 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,593 | __init__ | def __init__(self, client, attrs, entity=None, project=None):
self.client = client
self.project = project
self.entity = entity
self.query_generator = QueryGenerator()
super().__init__(dict(attrs))
self._attrs["spec"] = json.loads(self._attrs["spec"]) | python | wandb/apis/public.py | 3,404 | 3,410 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,594 | sections | def sections(self):
return self.spec["panelGroups"] | python | wandb/apis/public.py | 3,413 | 3,414 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,595 | runs | def runs(self, section, per_page=50, only_selected=True):
run_set_idx = section.get("openRunSet", 0)
run_set = section["runSets"][run_set_idx]
order = self.query_generator.key_to_server_path(run_set["sort"]["key"])
if run_set["sort"].get("ascending"):
order = "+" + order
... | python | wandb/apis/public.py | 3,416 | 3,437 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,596 | updated_at | def updated_at(self):
return self._attrs["updatedAt"] | python | wandb/apis/public.py | 3,440 | 3,441 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,597 | url | def url(self):
return self.client.app_url + "/".join(
[
self.entity,
self.project,
"reports",
"--".join(
[
urllib.parse.quote(self.display_name.replace(" ", "-")),
self... | python | wandb/apis/public.py | 3,444 | 3,457 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,598 | to_html | def to_html(self, height=1024, hidden=False):
"""Generate HTML containing an iframe displaying this report."""
url = self.url + "?jupyter=true"
style = f"border:none;width:100%;height:{height}px;"
prefix = ""
if hidden:
style += "display:none;"
prefix = ip... | python | wandb/apis/public.py | 3,459 | 3,467 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,599 | _repr_html_ | def _repr_html_(self) -> str:
return self.to_html() | python | wandb/apis/public.py | 3,469 | 3,470 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
1,600 | __init__ | def __init__(self, client, run, min_step, max_step, page_size=1000):
self.client = client
self.run = run
self.page_size = page_size
self.min_step = min_step
self.max_step = max_step
self.page_offset = min_step # minStep for next page
self.scan_offset = 0 # index... | python | wandb/apis/public.py | 3,486 | 3,494 | {
"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.