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,401
create_project
def create_project(self, name: str, entity: str): self.client.execute(self.CREATE_PROJECT, {"entityName": entity, "name": name})
python
wandb/apis/public.py
462
463
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,402
load_report
def load_report(self, path: str) -> "wandb.apis.reports.Report": """Get report at a given path. Arguments: path: (str) Path to the target report in the form `entity/project/reports/reportId`. You can get this by copy-pasting the URL after your wandb url. For example: ...
python
wandb/apis/public.py
465
479
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,403
create_user
def create_user(self, email, admin=False): """Create a new user. Arguments: email: (str) The name of the team admin: (bool) Whether this user should be a global instance admin Returns: A `User` object """ return User.create(self, email, admin...
python
wandb/apis/public.py
481
491
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,404
sync_tensorboard
def sync_tensorboard(self, root_dir, run_id=None, project=None, entity=None): """Sync a local directory containing tfevent files to wandb.""" from wandb.sync import SyncManager # TODO: circular import madness run_id = run_id or runid.generate_id() project = project or self.settings.get...
python
wandb/apis/public.py
493
515
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,405
client
def client(self): return self._client
python
wandb/apis/public.py
518
519
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,406
user_agent
def user_agent(self): return "W&B Public Client %s" % __version__
python
wandb/apis/public.py
522
523
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,407
api_key
def api_key(self): if self._api_key is not None: return self._api_key auth = requests.utils.get_netrc_auth(self.settings["base_url"]) key = None if auth: key = auth[-1] # Environment should take precedence if os.getenv("WANDB_API_KEY"): ...
python
wandb/apis/public.py
526
537
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,408
default_entity
def default_entity(self): if self._default_entity is None: res = self._client.execute(self.VIEWER_QUERY) self._default_entity = (res.get("viewer") or {}).get("entity") return self._default_entity
python
wandb/apis/public.py
540
544
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,409
viewer
def viewer(self): if self._viewer is None: self._viewer = User( self._client, self._client.execute(self.VIEWER_QUERY).get("viewer") ) self._default_entity = self._viewer.entity return self._viewer
python
wandb/apis/public.py
547
553
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,410
flush
def flush(self): """Flush the local cache. The api object keeps a local cache of runs, so if the state of the run may change while executing your script you must clear the local cache with `api.flush()` to get the latest values associated with the run. """ self._runs = {...
python
wandb/apis/public.py
555
562
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,411
from_path
def from_path(self, path): """Return a run, sweep, project or report from a path. Examples: ``` project = api.from_path("my_project") team_project = api.from_path("my_team/my_project") run = api.from_path("my_team/my_project/runs/id") sweep = ...
python
wandb/apis/public.py
564
618
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,412
_parse_project_path
def _parse_project_path(self, path): """Return project and entity for project specified by path.""" project = self.settings["project"] entity = self.settings["entity"] or self.default_entity if path is None: return entity, project parts = path.split("/", 1) if...
python
wandb/apis/public.py
620
629
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,413
_parse_path
def _parse_path(self, path): """Parse url, filepath, or docker paths. Allows paths in the following formats: - url: entity/project/runs/id - path: entity/project/id - docker: entity/project:id Entity is optional and will fall back to the current logged-in user. ...
python
wandb/apis/public.py
631
661
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,414
_parse_artifact_path
def _parse_artifact_path(self, path): """Return project, entity and artifact name for project specified by path.""" project = self.settings["project"] entity = self.settings["entity"] or self.default_entity if path is None: return entity, project parts = path.split("/...
python
wandb/apis/public.py
663
676
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,415
projects
def projects(self, entity=None, per_page=200): """Get projects for a given entity. Arguments: entity: (str) Name of the entity requested. If None, will fall back to default entity passed to `Api`. If no default entity, will raise a `ValueError`. per_page: (int)...
python
wandb/apis/public.py
678
699
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,416
project
def project(self, name, entity=None): if entity is None: entity = self.settings["entity"] or self.default_entity return Project(self.client, entity, name, {})
python
wandb/apis/public.py
701
704
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,417
reports
def reports(self, path="", name=None, per_page=50): """Get reports for a given project path. WARNING: This api is in beta and will likely change in a future release Arguments: path: (str) path to project the report resides in, should be in the form: "entity/project" nam...
python
wandb/apis/public.py
706
735
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,418
create_team
def create_team(self, team, admin_username=None): """Create a new team. Arguments: team: (str) The name of the team admin_username: (str) optional username of the admin user of the team, defaults to the current user. Returns: A `Team` object """ ...
python
wandb/apis/public.py
737
747
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,419
team
def team(self, team): return Team(self.client, team)
python
wandb/apis/public.py
749
750
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,420
user
def user(self, username_or_email): """Return a user from a username or email address. Note: This function only works for Local Admins, if you are trying to get your own user object, please use `api.viewer`. Arguments: username_or_email: (str) The username or email address of the us...
python
wandb/apis/public.py
752
772
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,421
users
def users(self, username_or_email): """Return all users from a partial username or email address query. Note: This function only works for Local Admins, if you are trying to get your own user object, please use `api.viewer`. Arguments: username_or_email: (str) The prefix or suffix ...
python
wandb/apis/public.py
774
786
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,422
runs
def runs( self, path: Optional[str] = None, filters: Optional[Dict[str, Any]] = None, order: str = "-created_at", per_page: int = 50, include_sweeps: bool = True, ): """Return a set of runs from a project that match the filters provided. You can filte...
python
wandb/apis/public.py
788
864
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,423
run
def run(self, path=""): """Return a single run by parsing path in the form entity/project/run_id. Arguments: path: (str) path to run in the form `entity/project/run_id`. If `api.entity` is set, this can be in the form `project/run_id` and if `api.project` is ...
python
wandb/apis/public.py
867
881
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,424
queued_run
def queued_run( self, entity, project, queue_name, run_queue_item_id, container_job=False, project_queue=None, ): """Return a single queued run based on the path. Parses paths of the form entity/project/queue_id/run_queue_item_id. """ ...
python
wandb/apis/public.py
883
904
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,425
sweep
def sweep(self, path=""): """Return a sweep by parsing path in the form `entity/project/sweep_id`. Arguments: path: (str, optional) path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this can be in the form project/sweep_id and if `api.project` is se...
python
wandb/apis/public.py
907
921
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,426
artifact_types
def artifact_types(self, project=None): entity, project = self._parse_project_path(project) return ProjectArtifactTypes(self.client, entity, project)
python
wandb/apis/public.py
924
926
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,427
artifact_type
def artifact_type(self, type_name, project=None): entity, project = self._parse_project_path(project) return ArtifactType(self.client, entity, project, type_name)
python
wandb/apis/public.py
929
931
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,428
artifact_versions
def artifact_versions(self, type_name, name, per_page=50): entity, project, collection_name = self._parse_artifact_path(name) artifact_type = ArtifactType(self.client, entity, project, type_name) return artifact_type.collection(collection_name).versions(per_page=per_page)
python
wandb/apis/public.py
934
937
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,429
artifact
def artifact(self, name, type=None): """Return a single artifact by parsing path in the form `entity/project/run_id`. Arguments: name: (str) An artifact name. May be prefixed with entity/project. Valid names can be in the following forms: name:version ...
python
wandb/apis/public.py
940
962
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,430
job
def job(self, name, path=None): if name is None: raise ValueError("You must specify name= to fetch a job.") return Job(self, name, path)
python
wandb/apis/public.py
965
968
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,431
__init__
def __init__(self, attrs: MutableMapping[str, Any]): self._attrs = attrs
python
wandb/apis/public.py
972
973
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,432
snake_to_camel
def snake_to_camel(self, string): camel = "".join([i.title() for i in string.split("_")]) return camel[0].lower() + camel[1:]
python
wandb/apis/public.py
975
977
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,433
display
def display(self, height=420, hidden=False) -> bool: """Display this object in jupyter.""" html = self.to_html(height, hidden) if html is None: wandb.termwarn("This object does not support `.display()`") return False if ipython.in_jupyter(): ipython.di...
python
wandb/apis/public.py
979
990
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,434
to_html
def to_html(self, *args, **kwargs): return None
python
wandb/apis/public.py
992
993
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,435
__getattr__
def __getattr__(self, name): key = self.snake_to_camel(name) if key == "user": raise AttributeError if key in self._attrs.keys(): return self._attrs[key] elif name in self._attrs.keys(): return self._attrs[name] else: raise Attribut...
python
wandb/apis/public.py
995
1,004
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,436
__init__
def __init__( self, client: Client, variables: MutableMapping[str, Any], per_page: Optional[int] = None, ): self.client = client self.variables = variables # We don't allow unbounded paging self.per_page = per_page if self.per_page is None: ...
python
wandb/apis/public.py
1,010
1,024
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,437
__iter__
def __iter__(self): self.index = -1 return self
python
wandb/apis/public.py
1,026
1,028
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,438
__len__
def __len__(self): if self.length is None: self._load_page() if self.length is None: raise ValueError("Object doesn't provide length") return self.length
python
wandb/apis/public.py
1,030
1,035
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,439
length
def length(self): raise NotImplementedError
python
wandb/apis/public.py
1,038
1,039
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,440
more
def more(self): raise NotImplementedError
python
wandb/apis/public.py
1,042
1,043
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,441
cursor
def cursor(self): raise NotImplementedError
python
wandb/apis/public.py
1,046
1,047
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,442
convert_objects
def convert_objects(self): raise NotImplementedError
python
wandb/apis/public.py
1,049
1,050
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,443
update_variables
def update_variables(self): self.variables.update({"perPage": self.per_page, "cursor": self.cursor})
python
wandb/apis/public.py
1,052
1,053
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,444
_load_page
def _load_page(self): if not self.more: return False self.update_variables() self.last_response = self.client.execute( self.QUERY, variable_values=self.variables ) self.objects.extend(self.convert_objects()) return True
python
wandb/apis/public.py
1,055
1,063
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,445
__getitem__
def __getitem__(self, index): loaded = True stop = index.stop if isinstance(index, slice) else index while loaded and stop > len(self.objects) - 1: loaded = self._load_page() return self.objects[index]
python
wandb/apis/public.py
1,065
1,070
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,446
__next__
def __next__(self): self.index += 1 if len(self.objects) <= self.index: if not self._load_page(): raise StopIteration if len(self.objects) <= self.index: raise StopIteration return self.objects[self.index]
python
wandb/apis/public.py
1,072
1,079
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,447
__init__
def __init__(self, client, attrs): super().__init__(attrs) self._client = client self._user_api = None
python
wandb/apis/public.py
1,123
1,126
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,448
user_api
def user_api(self): """An instance of the api using credentials from the user.""" if self._user_api is None and len(self.api_keys) > 0: self._user_api = wandb.Api(api_key=self.api_keys[0]) return self._user_api
python
wandb/apis/public.py
1,129
1,133
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,449
create
def create(cls, api, email, admin=False): """Create a new user. Arguments: api: (`Api`) The api instance to use email: (str) The name of the team admin: (bool) Whether this user should be a global instance admin Returns: A `User` object "...
python
wandb/apis/public.py
1,136
1,151
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,450
api_keys
def api_keys(self): if self._attrs.get("apiKeys") is None: return [] return [k["node"]["name"] for k in self._attrs["apiKeys"]["edges"]]
python
wandb/apis/public.py
1,154
1,157
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,451
teams
def teams(self): if self._attrs.get("teams") is None: return [] return [k["node"]["name"] for k in self._attrs["teams"]["edges"]]
python
wandb/apis/public.py
1,160
1,163
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,452
delete_api_key
def delete_api_key(self, api_key): """Delete a user's api key. Returns: Boolean indicating success Raises: ValueError if the api_key couldn't be found """ idx = self.api_keys.index(api_key) try: self._client.execute( s...
python
wandb/apis/public.py
1,165
1,182
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,453
generate_api_key
def generate_api_key(self, description=None): """Generate a new api key. Returns: The new api key, or None on failure """ try: # We must make this call using credentials from the original user key = self.user_api.client.execute( self.G...
python
wandb/apis/public.py
1,184
1,198
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,454
__repr__
def __repr__(self): if "email" in self._attrs: return f"<User {self._attrs['email']}>" elif "username" in self._attrs: return f"<User {self._attrs['username']}>" elif "id" in self._attrs: return f"<User {self._attrs['id']}>" elif "name" in self._attrs:...
python
wandb/apis/public.py
1,200
1,210
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,455
__init__
def __init__(self, client, team, attrs): super().__init__(attrs) self._client = client self.team = team
python
wandb/apis/public.py
1,224
1,227
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,456
delete
def delete(self): """Remove a member from a team. Returns: Boolean indicating success """ try: return self._client.execute( self.DELETE_MEMBER_MUTATION, {"id": self.id, "entityName": self.team} )["deleteInvite"]["success"] exce...
python
wandb/apis/public.py
1,229
1,240
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,457
__repr__
def __repr__(self): return f"<Member {self.name} ({self.account_type})>"
python
wandb/apis/public.py
1,242
1,243
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,458
__init__
def __init__(self, client, name, attrs=None): super().__init__(attrs or {}) self._client = client self.name = name self.load()
python
wandb/apis/public.py
1,324
1,328
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,459
create
def create(cls, api, team, admin_username=None): """Create a new team. Arguments: api: (`Api`) The api instance to use team: (str) The name of the team admin_username: (str) optional username of the admin user of the team, defaults to the current user. Retur...
python
wandb/apis/public.py
1,331
1,349
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,460
invite
def invite(self, username_or_email, admin=False): """Invite a user to a team. Arguments: username_or_email: (str) The username or email address of the user you want to invite admin: (bool) Whether to make this user a team admin, defaults to False Returns: Tr...
python
wandb/apis/public.py
1,351
1,370
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,461
create_service_account
def create_service_account(self, description): """Create a service account for the team. Arguments: description: (str) A description for this service account Returns: The service account `Member` object, or None on failure """ try: self._clie...
python
wandb/apis/public.py
1,372
1,389
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,462
load
def load(self, force=False): if force or not self._attrs: response = self._client.execute(self.TEAM_QUERY, {"name": self.name}) self._attrs = response["entity"] self._attrs["members"] = [ Member(self._client, self.name, member) for member in se...
python
wandb/apis/public.py
1,391
1,399
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,463
__repr__
def __repr__(self): return f"<Team {self.name}>"
python
wandb/apis/public.py
1,401
1,402
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,464
__init__
def __init__(self, client, entity, per_page=50): self.client = client self.entity = entity variables = { "entity": self.entity, } super().__init__(client, variables, per_page)
python
wandb/apis/public.py
1,429
1,435
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,465
length
def length(self): return None
python
wandb/apis/public.py
1,438
1,439
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,466
more
def more(self): if self.last_response: return self.last_response["models"]["pageInfo"]["hasNextPage"] else: return True
python
wandb/apis/public.py
1,442
1,446
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,467
cursor
def cursor(self): if self.last_response: return self.last_response["models"]["edges"][-1]["cursor"] else: return None
python
wandb/apis/public.py
1,449
1,453
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,468
convert_objects
def convert_objects(self): return [ Project(self.client, self.entity, p["node"]["name"], p["node"]) for p in self.last_response["models"]["edges"] ]
python
wandb/apis/public.py
1,455
1,459
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,469
__repr__
def __repr__(self): return f"<Projects {self.entity}>"
python
wandb/apis/public.py
1,461
1,462
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,470
__init__
def __init__(self, client, entity, project, attrs): super().__init__(dict(attrs)) self.client = client self.name = project self.entity = entity
python
wandb/apis/public.py
1,468
1,472
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,471
path
def path(self): return [self.entity, self.name]
python
wandb/apis/public.py
1,475
1,476
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,472
url
def url(self): return self.client.app_url + "/".join(self.path + ["workspace"])
python
wandb/apis/public.py
1,479
1,480
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,473
to_html
def to_html(self, height=420, hidden=False): """Generate HTML containing an iframe displaying this project.""" 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
1,482
1,490
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,474
_repr_html_
def _repr_html_(self) -> str: return self.to_html()
python
wandb/apis/public.py
1,492
1,493
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,475
__repr__
def __repr__(self): return "<Project {}>".format("/".join(self.path))
python
wandb/apis/public.py
1,495
1,496
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,476
artifacts_types
def artifacts_types(self, per_page=50): return ProjectArtifactTypes(self.client, self.entity, self.name)
python
wandb/apis/public.py
1,499
1,500
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,477
sweeps
def sweeps(self): query = gql( """ query GetSweeps($project: String!, $entity: String!) { project(name: $project, entityName: $entity) { totalSweeps sweeps { edges { node { ...
python
wandb/apis/public.py
1,503
1,547
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,478
__init__
def __init__( self, client: "RetryingClient", entity: str, project: str, filters: Optional[Dict[str, Any]] = None, order: Optional[str] = None, per_page: int = 50, include_sweeps: bool = True, ): self.entity = entity self.project = proj...
python
wandb/apis/public.py
1,581
1,603
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,479
length
def length(self): if self.last_response: return self.last_response["project"]["runCount"] else: return None
python
wandb/apis/public.py
1,606
1,610
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,480
more
def more(self): if self.last_response: return self.last_response["project"]["runs"]["pageInfo"]["hasNextPage"] else: return True
python
wandb/apis/public.py
1,613
1,617
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,481
cursor
def cursor(self): if self.last_response: return self.last_response["project"]["runs"]["edges"][-1]["cursor"] else: return None
python
wandb/apis/public.py
1,620
1,624
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,482
convert_objects
def convert_objects(self): objs = [] if self.last_response is None or self.last_response.get("project") is None: raise ValueError("Could not find project %s" % self.project) for run_response in self.last_response["project"]["runs"]["edges"]: run = Run( sel...
python
wandb/apis/public.py
1,626
1,658
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,483
__repr__
def __repr__(self): return f"<Runs {self.entity}/{self.project}>"
python
wandb/apis/public.py
1,660
1,661
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,484
__init__
def __init__( self, client: "RetryingClient", entity: str, project: str, run_id: str, attrs: Optional[Mapping] = None, include_sweeps: bool = True, ): """Initialize a Run object. Run is always initialized by calling api.runs() where api is an ...
python
wandb/apis/public.py
1,688
1,720
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,485
state
def state(self): return self._state
python
wandb/apis/public.py
1,723
1,724
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,486
entity
def entity(self): return self._entity
python
wandb/apis/public.py
1,727
1,728
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,487
username
def username(self): wandb.termwarn("Run.username is deprecated. Please use Run.entity instead.") return self._entity
python
wandb/apis/public.py
1,731
1,733
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,488
storage_id
def storage_id(self): # For compatibility with wandb.Run, which has storage IDs # in self.storage_id and names in self.id. return self._attrs.get("id")
python
wandb/apis/public.py
1,736
1,740
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,489
id
def id(self): return self._attrs.get("name")
python
wandb/apis/public.py
1,743
1,744
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,490
id
def id(self, new_id): attrs = self._attrs attrs["name"] = new_id return new_id
python
wandb/apis/public.py
1,747
1,750
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,491
name
def name(self): return self._attrs.get("displayName")
python
wandb/apis/public.py
1,753
1,754
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,492
name
def name(self, new_name): self._attrs["displayName"] = new_name return new_name
python
wandb/apis/public.py
1,757
1,759
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,493
create
def create(cls, api, run_id=None, project=None, entity=None): """Create a run for the given project.""" run_id = run_id or runid.generate_id() project = project or api.settings.get("project") or "uncategorized" mutation = gql( """ mutation UpsertBucket($project: Strin...
python
wandb/apis/public.py
1,762
1,801
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,494
load
def load(self, force=False): query = gql( """ query Run($project: String!, $entity: String!, $name: String!) { project(name: $project, entityName: $entity) { run(name: $name) { ...RunFragment } } } %s...
python
wandb/apis/public.py
1,803
1,861
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,495
wait_until_finished
def wait_until_finished(self): query = gql( """ query RunState($project: String!, $entity: String!, $name: String!) { project(name: $project, entityName: $entity) { run(name: $name) { state } ...
python
wandb/apis/public.py
1,864
1,884
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,496
update
def update(self): """Persist changes to the run object to the wandb backend.""" mutation = gql( """ mutation UpsertBucket($id: String!, $description: String, $display_name: String, $notes: String, $tags: [String!], $config: JSONString!, $groupName: String) { upsertBucket(...
python
wandb/apis/public.py
1,887
1,912
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,497
delete
def delete(self, delete_artifacts=False): """Delete the given run from the wandb backend.""" mutation = gql( """ mutation DeleteRun( $id: ID!, %s ) { deleteRun(input: { id: $id, %s...
python
wandb/apis/public.py
1,915
1,946
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,498
save
def save(self): self.update()
python
wandb/apis/public.py
1,948
1,949
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,499
json_config
def json_config(self): config = {} for k, v in self.config.items(): config[k] = {"value": v, "desc": None} return json.dumps(config)
python
wandb/apis/public.py
1,952
1,956
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }
1,500
_exec
def _exec(self, query, **kwargs): """Execute a query against the cloud backend.""" variables = {"entity": self.entity, "project": self.project, "name": self.id} variables.update(kwargs) return self.client.execute(query, variable_values=variables)
python
wandb/apis/public.py
1,958
1,962
{ "name": "Git-abouvier/wandb", "url": "https://github.com/Git-abouvier/wandb.git", "license": "MIT", "stars": 0, "forks": 0 }