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

fixes failing smoke tests #134

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ MaxDiffusion started as a fork of [Diffusers](https://github.com/huggingface/dif

Whether you are forking MaxDiffusion for your own needs or intending to contribute back to the community, a full suite of tests can be found in `tests` and `src/maxdiffusion/tests`.

To run unit tests, simply run:
To run unit tests, you'll need to [install gcsfuse](https://cloud.google.com/storage/docs/cloud-storage-fuse/install) then simply run:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we recommend users to run setup.sh? It has gcsfuse installation: https://github.com/AI-Hypercomputer/maxdiffusion/blob/main/setup.sh#L28-L32. But I don't see it mentioned in README.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh that's a good idea. Let me try it first and make sure everything works as expected then I will update the README

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@aireenmei please take another look.

```
python -m pytest
```
Expand Down
1 change: 1 addition & 0 deletions src/maxdiffusion/configs/base_xl_lightning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ici_tensor_parallelism: 1
# Dataset
# Replace with dataset path or train_data_dir. One has to be set.
dataset_name: ''
dataset_type: 'tf'
train_data_dir: ''
dataset_config_name: ''
jax_cache_dir: ''
Expand Down
2 changes: 1 addition & 1 deletion src/maxdiffusion/max_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def write_metrics_for_gcs(metrics, step, config, running_metrics):
"""Writes metrics to gcs"""
metrics_dict_step = _prepare_metrics_for_json(metrics, step, config.run_name)
running_metrics.append(metrics_dict_step)
if (step + 1) % config.log_period == 0 or step == config.steps - 1:
if (step + 1) % config.log_period == 0 or step == config.max_train_steps - 1:
start_step = (step // config.log_period) * config.log_period
metrics_filename = f"metrics_step_{start_step:06}_to_step_{step:06}.txt"
with open(metrics_filename, "w", encoding="utf8") as metrics_for_gcs:
Expand Down