grelu.resources.wandb#
Legacy functions for accessing the gReLU model zoo on Weights & Biases (wandb).
Note: This module is deprecated. Use grelu.resources for HuggingFace-based access.
Attributes#
Functions#
|
List all projects in the model zoo |
|
List all artifacts associated with a project in the model zoo |
|
List all models associated with a project in the model zoo |
|
List all datasets associated with a project in the model zoo |
|
List attributes of all runs associated with a project in the model zoo |
|
Retrieve an artifact associated with a project in the model zoo |
|
List all datasets associated with a model in the model zoo |
|
List all models associated with a dataset in the model zoo |
|
Download and load a model from the model zoo |
Module Contents#
- grelu.resources.wandb.projects(host: str = DEFAULT_WANDB_HOST) List[str][source]#
List all projects in the model zoo
- Parameters:
host – URL of the Weights & Biases host
- Returns:
List of project names
- grelu.resources.wandb.artifacts(project: str, host: str = DEFAULT_WANDB_HOST, type_is: str | None = None, type_contains: str | None = None) List[str][source]#
List all artifacts associated with a project in the model zoo
- Parameters:
project – Name of the project to search
host – URL of the Weights & Biases host
type_is – Return only artifacts with this type
type_contains – Return only artifacts whose type contains this string
- Returns:
List of artifact names
- grelu.resources.wandb.models(project: str, host: str = DEFAULT_WANDB_HOST) List[str][source]#
List all models associated with a project in the model zoo
- Parameters:
project – Name of the project to search
host – URL of the Weights & Biases host
- Returns:
List of model names
- grelu.resources.wandb.datasets(project: str, host: str = DEFAULT_WANDB_HOST) List[str][source]#
List all datasets associated with a project in the model zoo
- Parameters:
project – Name of the project to search
host – URL of the Weights & Biases host
- Returns:
List of dataset names
- grelu.resources.wandb.runs(project: str, host: str = DEFAULT_WANDB_HOST, field: str = 'id', filters: Dict[str, Any] | None = None) List[str][source]#
List attributes of all runs associated with a project in the model zoo
- Parameters:
project – Name of the project to search
host – URL of the Weights & Biases host
field – Field to return from the run metadata
filters – Dictionary of filters to pass to api.runs
- Returns:
List of run attributes
- grelu.resources.wandb.get_artifact(name: str, project: str, host: str = DEFAULT_WANDB_HOST, alias: str = 'latest')[source]#
Retrieve an artifact associated with a project in the model zoo
- Parameters:
name – Name of the artifact
project – Name of the project containing the artifact
host – URL of the Weights & Biases host
alias – Alias of the artifact
- Returns:
The specific artifact
- grelu.resources.wandb.get_dataset_by_model(model_name: str, project: str, host: str = DEFAULT_WANDB_HOST, alias: str = 'latest') List[str][source]#
List all datasets associated with a model in the model zoo
- Parameters:
model_name – Name of the model
project – Name of the project containing the model
host – URL of the Weights & Biases host
alias – Alias of the model artifact
- Returns:
A list containing the names of all datasets linked to the model
- grelu.resources.wandb.get_model_by_dataset(dataset_name: str, project: str, host: str = DEFAULT_WANDB_HOST, alias: str = 'latest') List[str][source]#
List all models associated with a dataset in the model zoo
- Parameters:
dataset_name – Name of the dataset
project – Name of the project containing the dataset
host – URL of the Weights & Biases host
alias – Alias of the dataset artifact
- Returns:
A list containing the names of all models linked to the dataset
- grelu.resources.wandb.load_model(project: str, model_name: str, device: str | int = 'cpu', host: str = DEFAULT_WANDB_HOST, alias: str = 'latest', checkpoint_file: str = 'model.ckpt', weights_only: bool = False) grelu.lightning.LightningModel[source]#
Download and load a model from the model zoo
- Parameters:
project – Name of the project containing the model
model_name – Name of the model
device – Device index on which to load the model.
host – URL of the Weights & Biases host
alias – Alias of the model artifact
checkpoint_file – Name of the checkpoint file contained in the model artifact
weights_only – Whether to only load weights (default: False)
- Returns:
A LightningModel object