Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Sktime Pytorch forecasting All Objects

From Leeroopedia
Revision as of 16:41, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Sktime_Pytorch_forecasting_All_Objects.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Time_Series, Forecasting, Deep_Learning
Last Updated 2026-02-08 08:00 GMT

Overview

Registry lookup function for listing all available forecasting models, metrics, and other objects in the pytorch-forecasting package.

Description

The all_objects function crawls the pytorch-forecasting module to discover all classes that inherit from skbase-compatible base classes. It supports filtering by object type (e.g., models, metrics), filtering by tags, excluding specific objects by name, and returning results as lists of tuples or as a pandas.DataFrame. The function delegates to skbase.lookup.all_objects internally and automatically ignores test modules, setup files, contrib, utils, and "all" modules.

This is the primary programmatic interface for discovering what forecasting components are available in the installed version of pytorch-forecasting.

Usage

Use this function to programmatically discover available models, metrics, or other registered objects. It is useful for auto-generating documentation, building model selection pipelines, or exploring the library's capabilities at runtime.

Code Reference

Source Location

Signature

def all_objects(
    object_types=None,
    filter_tags=None,
    exclude_objects=None,
    return_names=True,
    as_dataframe=False,
    return_tags=None,
    suppress_import_stdout=True,
)

Import

from pytorch_forecasting._registry import all_objects

I/O Contract

Inputs

Name Type Required Description
object_types str, list of str, or None No Filter by object scitype (e.g., model, metric). None returns all objects
filter_tags dict or None No Dictionary of tag name to tag value(s) for filtering. Supports str, list of str, and re.Pattern values
exclude_objects str, list of str, or None No Names of objects to exclude from results
return_names bool No If True, include class name in the returned tuples (default: True)
as_dataframe bool No If True, return results as a pandas.DataFrame (default: False)
return_tags str, list of str, or None No Tag names to include in return values for each object
suppress_import_stdout bool No Whether to suppress stdout during module imports (default: True)

Outputs

Name Type Description
result list of objects If return_names=False and return_tags=None, a list of matching class objects
result list of tuples If return_names=True or return_tags is set, list of (name, class, optional tags) tuples
result pandas.DataFrame If as_dataframe=True, DataFrame with columns for names, objects, and optional tags

Usage Examples

from pytorch_forecasting._registry import all_objects

# Get all registered objects as a DataFrame
all_df = all_objects(as_dataframe=True)
print(all_df)

# Get only objects of a specific type
models = all_objects(object_types="forecaster", return_names=True)
for name, cls in models:
    print(f"{name}: {cls}")

# Filter by tags and exclude specific objects
filtered = all_objects(
    filter_tags={"capability:pred_int": True},
    exclude_objects=["ExperimentalModel"],
    as_dataframe=True,
)

# Get objects without names (just the classes)
classes = all_objects(return_names=False)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment