Skip to main content

Q&A

Created on October 5|Last edited on October 5

In the wand.config object, how does it handle nested dictionaries and lists (we are using both today)? How does it appear in the portal?

When intitiating W&B run, you can pass your nested dictionary to the run initialization. This would look like either
run = wandb.init(project = "my_project", config = my_nested_dict)
param1 = my_nested_dict["param1"]
## do something

run.finish()
or

with wandb.init(project = "my_project", config = my_nested_dict) as run:
## do something

In either event, you can access the nested dictionary via `wandb.config` or `run.config`. And from here you can interact with the config as desired. I typically like to use something like easydict to interact with the config once it has been set. For example
run = wandb.init(project = "my_project", config = my_nested_dict)
config = EasyDict(run.config)
## do something
run.finish()

What kind of searches can we do across runs? Can we look for specific parameters and values?

In terms of search, there are a few ways to accomplish this. We do provide a tabular view of all runs within a project. You can certainly sort this view, apply filters, as well as groupings. Below, each line in the tabular view is a run, detailing the config and info that was logged for each run. You may click the run name to go back to the run in the W&B UI for further exploration.

Run set
63

We also provide ability to create some plots on top of this view, for example, maybe I want a parallel coordinate plot to see what combination of hyperparameters provide the best result, or maybe create a plot of parameter importances (not a very interesting example captured below, but it should illustrate what is possible). In the first plot below ( parallel coordinated) each line is a run and is a live link back to the run in the W&B UI).




How does wandb handle the case of subsequent runs adding or removing parameters or values? What is best practice around when to make a whole new project?

If the run has finished and you do not want to “restart” the run, you can update it via the wandb API. You can see some examples here. If you want to resume a run, it is a matter of calling wandb.init appropriately. Please see the details of resuming a run here
Concerning best practices on when to make a new project, it all depends. I personally consider a project as all the runs and artifacts that are in support of a single use case, but I have also experimented with using a project as a dataset repo. In this case, the project houses multiple datasets, stored as artifacts, and these datasets might be considered benchmark datasets that are used to evaluate models that I have developed.
The main point here is that W&B is flexible enough to support patterns you and the team pursues.

Where can we find more details on how lineages and artifacts work? I do recall wandb was working on some new automation to do re-runs.

For more details on Artifacts and lineage, please consult the docs. Long story short, W&B Artifacts have names and types, and you made add references, files, and / or directories to the Artifact. W&B Artifacts are created and consumed by W&B runs. Suppose you have already logged an artifact that has name `my_data` and type `dataset` and it is coupled with the project `my-project`. In order to establish lineage, I would do something like
```python

with wandb.init(project="my-project") as run:
dataset_artifact = run.use_artifact("my-project/my_dataset:latest", type = "dataset")
## assume data is download
## and model is trained with data
## then serialized to disk as my_model.pkl
model_artifact = wandb.Artifact(name = "my_model", type = "model")
model_artifact.add_file("my_model.pkl")
run.log_artifact(model_artifact) dataset_artifact = run.use_artifact("my-project/my_data:latest", type = "dataset")
This syntax will connect the dataset artifact to the run in the UI’s Artifact Lineage. Click on the lineage tab below to see the lineage of the my_model artifact

Error: Could not load
We have a model registry in beta right now, which extends the Artifacts to a full blown model registry. You may see some early docs here
As for some new automation features, this is going to be part of our Launch Product. This is currently customer preview beta, and you may find documentation here.
artifact