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

[SDK] Use dictionary unpacking to pass trainer function arguments #2383

Open
astefanutti opened this issue Jan 9, 2025 · 2 comments · May be fixed by #2384
Open

[SDK] Use dictionary unpacking to pass trainer function arguments #2383

astefanutti opened this issue Jan 9, 2025 · 2 comments · May be fixed by #2384

Comments

@astefanutti
Copy link
Contributor

What you would like to be added?

A more straightforward way to pass arguments to the training function, e.g.:

def train_func(batch_size=64,
               test_batch_size=1000,
               epochs=10,
               lr=1.0,
               gamma=0.7,
               dry_run=False,
               seed=1,
               log_interval=10,
               save_model=False):
...

client.train(
    trainer=Trainer(
        func=train_func,
        func_args={
            "batch_size": 64,
            "test_batch_size": 1000,
            "epochs": 10,
            "lr": 1.0,
            "gamma": 0.7,
            "dry_run": False,
            "seed": 1,
            "log_interval": 10,
            "save_model": False,
        },
    ),
)

Why is this needed?

It feels closer to what would be typically written if the training script would run standalone.

Love this feature?

Give it a 👍 We prioritize the features with most 👍

@andreyvelich
Copy link
Member

/remove-label lifecycle/needs-triage

@andreyvelich
Copy link
Member

/area sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants