axlearn icon indicating copy to clipboard operation
axlearn copied to clipboard

Use lambda instead of functools.partial to create single-host config maker

Open yhtang opened this issue 8 months ago • 4 comments

Fixes #1151

An alternative solution is to use functools.wraps but that requires a custom config validator:

axlearn.common.config.InvalidConfigValueError: Invalid config value type <class 'functools.partial'> for value "functools.partial(<function trainer_configs.<locals>.make_single_host_config at 0x722900936160>, 'fuji-3B-v3-flash')". Consider registering a custom validator with `register_validator`.

yhtang avatar May 02 '25 21:05 yhtang

I have not encountered this issue. How can I reproduce it?

Ethanlm avatar May 02 '25 21:05 Ethanlm

I have not encountered this issue. How can I reproduce it?

This is only triggered if using one of the *-single-host configs, e.g. fuji-3B-v3-flash-single-host

yhtang avatar May 05 '25 17:05 yhtang

I have not encountered this issue. How can I reproduce it?

This is only triggered if using one of the *-single-host configs, e.g. fuji-3B-v3-flash-single-host

Yeah I have been using single-host config for my testing on TPU recently.

Ethanlm avatar May 05 '25 21:05 Ethanlm

This pull request has been automatically marked as stale because it has been inactive for 60 days. It will be closed in 7 days if no further activity occurs. If you would like to continue working on this, please remove the stale label or leave a comment.

github-actions[bot] avatar Oct 21 '25 02:10 github-actions[bot]