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

Expand paramenter dictionaries in node functions declarations #3818

Open
astrojuanlu opened this issue Apr 17, 2024 · 1 comment
Open

Expand paramenter dictionaries in node functions declarations #3818

astrojuanlu opened this issue Apr 17, 2024 · 1 comment
Labels
Component: Documentation 📄 Issue/PR for markdown and API documentation

Comments

@astrojuanlu
Copy link
Member

Description

To clarify, this is more about going from

def split_data(data: pd.DataFrame, parameters: dict[str, Any]) -> Tuple:
    X = data[parameters["features"]]
    y = data["price"]
    X_train, X_test, y_train, y_test = train_test_split(
        X, y, test_size=parameters["test_size"], random_state=parameters["random_state"]
    )
    ...

            node(
                func=split_data,
                inputs=["model_input_table", "params:model_options"],

to

def split_data(data: pd.DataFrame, features: list[str], test_size: float, random_state: int) -> Tuple:
    X = data[features]
    y = data["price"]
    X_train, X_test, y_train, y_test = train_test_split(
        X, y, test_size=test_size, random_state=random_state
    )
    ...

            node(
                func=split_data,
                inputs=["model_input_table", "params:model_options.features", "params:model_options.test_size", "params:model_options.random_state"],

does it make sense?

Originally posted by @astrojuanlu in #3782 (comment)

Documentation page (if applicable)

The task is to find all occurrences in documentation and starters.

Context

@datajoely
Copy link
Contributor

100000000% I would even go as far as hiding parameters from the docs - explicit is better than implicit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation 📄 Issue/PR for markdown and API documentation
Projects
Status: No status
Development

No branches or pull requests

2 participants