-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix config in maxengine #1339
base: main
Are you sure you want to change the base?
Fix config in maxengine #1339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the pylint/code style test failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once the build test passes. Minor note - the link in the PR description points to this PR instead of PR 1285. Mind updating that?
@@ -1166,7 +1166,6 @@ def create_engine_from_config_flags(batch_size, max_prefill_predict_length, max_ | |||
option = f"{k}={v}" | |||
updated_args.append(option) | |||
print(f"Invoking maxengine with args:\n \t{updated_args}") | |||
pyconfig.initialize(updated_args) | |||
cfg = MaxEngineConfig(cp.deepcopy(pyconfig._config.keys)) # pylint: disable=protected-access |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What error were you seeing without this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the error
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/opt/maxtext/MaxText/inference_mlperf/offline_mode.py", line 535, in <module>
app.run(main)
File "/usr/local/lib/python3.12/dist-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/usr/local/lib/python3.12/dist-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
^^^^^^^^^^
File "/opt/maxtext/MaxText/inference_mlperf/offline_mode.py", line 467, in main
engine = create_engine_from_config_flags(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/maxtext/MaxText/maxengine.py", line 1268, in create_engine_from_config_flags
cfg = MaxEngineConfig(cp.deepcopy(pyconfig._config.keys)) # pylint: disable=protected-access
^^^^^^^^^^^^^^^^
AttributeError: module 'pyconfig' has no attribute '_config'
Did you test this on TPU (Trillium) or GPU? Also can you please paste the error you see. cc @singh-mitali, PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Description
Fix the bug from pr/1285.
FIXES: b/396747968
Tests
Tested this code with MLPerf inference Llama2-70b
Checklist
Before submitting this PR, please make sure (put X in square brackets):