Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(public-api): make all sweep attrs accessible via api.project.sweeps #7457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luisbergua
Copy link
Contributor

Description

What does the PR do? Include a concise description of the PR contents.

Allows users to access all attrs of a sweep when doing api.project.sweep

  • I updated CHANGELOG.md, or it's not applicable

Testing

How was this PR tested?

Using this code:

import wandb

api = wandb.Api()

project = api.project(name="pytorch-sweeps-demo", entity="test-debug")
sweep = [sweep for sweep in project.sweeps() if sweep.id == "vdnc4y73"][0]
try:
    print(sweep.runs)
    print(sweep.state)
except Exception as e:
    print("Project error")
    print(e)

Before:

[]
Project error
'<Sweep test-debug/pytorch-sweeps-demo/vdnc4y73 (Unknown State)>' object has no attribute 'state'

After:

<Runs test-debug/pytorch-sweeps-demo>
FINISHED

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.73%. Comparing base (5b5edfe) to head (b988bde).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7457      +/-   ##
==========================================
- Coverage   75.26%   73.73%   -1.53%     
==========================================
  Files         517      517              
  Lines       54532    54532              
==========================================
- Hits        41042    40211     -831     
- Misses      13108    13942     +834     
+ Partials      382      379       -3     
Flag Coverage Δ
func 43.25% <ø> (+0.04%) ⬆️
system 62.44% <ø> (-0.03%) ⬇️
unit 53.94% <ø> (-3.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
wandb/apis/public/projects.py 78.78% <ø> (-9.10%) ⬇️

... and 35 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant