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

update to be deprecated evaluation_strategy #1682

Merged
merged 3 commits into from
Nov 16, 2024
Merged

Conversation

winglian
Copy link
Collaborator

@winglian winglian commented Jun 3, 2024

No description provided.

def validate_evaluation_strategy(cls, evaluation_strategy):
if evaluation_strategy is not None:
LOG.warning("evaluation_strategy is deprecated, use eval_strategy instead")
return evaluation_strategy
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 need to add one validation where we remap eval_strategy = evaluation_strategy if both aren't set. If both are set, we should error out.

Comment on lines -589 to -590
if cfg.fsdp and "bnb" in cfg.optimizer:
raise ValueError(f"FSDP not compatible with {cfg.optimizer}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This does not exist in our config validation check. Is that okay?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let's address these in another PR, since these aren't being checked currently

Comment on lines -555 to -582
if cfg.deepspeed and Path(cfg.deepspeed).is_file():
with open(cfg.deepspeed, encoding="utf-8") as file:
contents = file.read()
deepspeed_cfg: DictDefault = DictDefault(json.loads(contents))
if cfg.flash_attention:
if (
deepspeed_cfg.zero_optimization
and deepspeed_cfg.zero_optimization.stage == 3
):
if not (
(
deepspeed_cfg.bf16
and deepspeed_cfg.bf16.enabled # pylint: disable=no-member
is True
)
or (
deepspeed_cfg.fp16
and deepspeed_cfg.fp16.enabled # pylint: disable=no-member
is True
)
):
raise ValueError(
"bf16.enabled or fp16.enabled must be set to true when using ZeRO-3 with flash-attention"
)
if "8bit" in cfg.optimizer and deepspeed_cfg.optimizer:
LOG.warning(
f"conflicting optimizer: {cfg.optimizer} used alongside deepspeed optimizer."
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This does not exist in our config validation check. Is that okay?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let's address these in another PR, since these aren't being checked currently

@NanoCode012
Copy link
Collaborator

I see, c4 dataset being mentioned but don't see change related to it.

@winglian
Copy link
Collaborator Author

I see, c4 dataset being mentioned but don't see change related to it.

Ah, this is an old enough PR that the c4 issue was pixed in another PR already

@winglian winglian changed the title update to be deprecated evaluation_strategy and c4 dataset update to be deprecated evaluation_strategy Nov 15, 2024
@winglian winglian merged commit c16ec39 into main Nov 16, 2024
12 checks passed
@winglian winglian deleted the deprecation-fixes branch November 16, 2024 00:10
bursteratom pushed a commit that referenced this pull request Nov 18, 2024
* update to be deprecated evaluation_strategy and c4 dataset

* chore: lint

* remap eval strategy to new config and add tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants