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

Use Mosaic constant for GPU file prefix #3018

Merged
merged 3 commits into from
Feb 16, 2024
Merged

Use Mosaic constant for GPU file prefix #3018

merged 3 commits into from
Feb 16, 2024

Conversation

jjanezhang
Copy link
Contributor

@jjanezhang jjanezhang commented Feb 15, 2024

Use Mosaic constant for GPU file prefix

Swapping out manual coded prefix file for a constant on the Mosaic side.

Confirmed that this works with logging

image

@jjanezhang jjanezhang self-assigned this Feb 16, 2024
@jjanezhang jjanezhang marked this pull request as ready for review February 16, 2024 00:27
@jjanezhang jjanezhang requested a review from a team as a code owner February 16, 2024 00:27
Copy link
Contributor

@j316chuck j316chuck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a comment. overall lgtm

@jjanezhang jjanezhang merged commit 6e28c88 into dev Feb 16, 2024
14 checks passed
@jjanezhang jjanezhang deleted the jane/new-constant branch February 16, 2024 01:11
@@ -485,7 +486,7 @@ def main():
MOSAICML_PLATFORM_ENV_VAR,
'false').lower() == 'true' and str(os.environ.get(MOSAICML_LOG_DIR_ENV_VAR, 'false')).lower() != 'false':
log.info('Logging all GPU ranks to Mosaic Platform.')
log_file_format = f'{os.environ.get(MOSAICML_LOG_DIR_ENV_VAR)}/gpu_{{rank}}.txt'
log_file_format = f'{os.environ.get(MOSAICML_LOG_DIR_ENV_VAR)}/{os.environ.get(MOSAICML_GPU_LOG_FILE_PREFIX_ENV_VAR)}{{local_rank}}.txt'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjanezhang this will error if the env var doesn't exist, did you want that? or should it be more permissive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, let me add it to the condition so we don't fail the run entirely if the prefix is missing

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

Successfully merging this pull request may close these issues.

3 participants