# How to retrieve the \`group\` and \`job\_type\` of a resumed run?

**URL:** https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031
**Category:** W&B Help
**Created:** [August 30, 2022, 3:53pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031 "2022-08-30T15:53:04Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![avm21](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@avm21](https://community.wandb.ai/u/avm21)
#### Post date: [August 30, 2022, 3:53pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/1 "2022-08-30T15:53:04Z")

</div>

I am inspecting and analysing my best runs. I expected that `group` and `job_type` would be populated with the resumed run’s values after running the code below.

```python
run_id = input("id=")
with wandb.init(entity=wandb_entity, project=wandb_project, id=run_id, resume="must") as wandb_r:
    config = wandb_r.config
    group = wandb_r.group
    job_type = wandb_r.job_type

```

Even though `config` is successfully recovered, `group` and `job_type` are just empty strings. How do I retrieve group and job\_type values from WandB? Thanks.

---

<div class="post-metadata">

### Author: ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)
#### Post date: [September 2, 2022, 2:18pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/2 "2022-09-02T14:18:38Z")

</div>

Hi @avm21, it looks like we don’t download these on resumed runs but rather we don’t update them unless you explicitly change them on a resumed run. If you need to get group/job\_type you can use the public API like this to access anything you may need:

```auto
import wandb
from wandb import Api

api = Api()

with wandb.init(entity=wandb_entity, project=wandb_project, id=run_id, resume="must") as wandb_r:
    config = wandb_r.config

    # A resumed run will still have the path attribute which can be used to access the run via the API
    api_run = api.run(wandb_r.path)

    # This will correctly print the group of the run
    print(api_run.group)

```

Let me know if you have any questions around this.

Thank you,  
Nate

---

<div class="post-metadata">

### Author: ![avm21](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@avm21](https://community.wandb.ai/u/avm21)
#### Post date: [September 2, 2022, 2:48pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/3 "2022-09-02T14:48:41Z")

</div>

Hi Nate,

Thank you for the snippet, it will do! The only question that remains is “why not?”, but I guess it is more of a rhetorical kind and does not necessitate an answer.

Regards,

---

<div class="post-metadata">

### Author: ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)
#### Post date: [September 9, 2022, 4:54pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/4 "2022-09-09T16:54:52Z")

</div>

Hi @avm21,  
Glad this got you unblocked! I’m not sure the reasoning behind not downloading all metadata associated with the run when it is resumed but if you would like to see a change in this behavior I’d be happy to put a feature request around this?

Thank you,  
Nate

---

<div class="post-metadata">

### Author: ![avm21](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@avm21](https://community.wandb.ai/u/avm21)
#### Post date: [September 9, 2022, 10:28pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/5 "2022-09-09T22:28:55Z")

</div>

Yes, I would like to see a change in this behaviour, even though I can live without it. I expected the fields of `wandb_r` to be repopulated on resume, and I guess other reasonable users would find this expectation reasonable. First, it is only logical that since `wandb_r` represents a run, the run’s properties are reflected in `wandb_r`’s properties. Second, it allows me to re-use code, for as far as I remember, `wandb_r.group` is set when I initiate a new run. Third, I’ve been always confused as to the purpose and difference between `wandb.public.Api.Run` and `wandb.Run` objects, and the fewer differences there are, the better I like it.

Kind regards,

---

<div class="post-metadata">

### Author: ![nathank](https://avatars.discourse-cdn.com/v4/letter/n/7ea924/32.png) [@nathank](https://community.wandb.ai/u/nathank)
#### Post date: [September 16, 2022, 3:33pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/6 "2022-09-16T15:33:44Z")

</div>

@avm21, I’ve submitted your feedback to our engineering team. Thank you for the details as to why you feel this is important. I agree that it is counter-intuitive that some attributes are filled when resuming but some are not.

I’ll follow up with you here once the engineering team has a chance to take a look at this.

Thank you,  
Nate

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)
#### Post date: [November 15, 2022, 3:34pm UTC](https://community.wandb.ai/t/how-to-retrieve-the-group-and-job-type-of-a-resumed-run/3031/7 "2022-11-15T15:34:04Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
