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

Fix unit test failure after PR #1106 #1107

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

mhirki
Copy link
Contributor

@mhirki mhirki commented Oct 27, 2024

My previous pull request #1106 caused the unit tests to fail. Setting both flux_schedule_shift and flux_schedule_auto_shift explicitly in the unit test seems to fix the issue.

======================================================================
ERROR: test_misc_init (test_trainer.TestTrainer.test_misc_init)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/unittest/mock.py", line 1378, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/SimpleTuner/SimpleTuner/tests/test_trainer.py", line 154, in test_misc_init
    trainer = Trainer(disable_accelerator=True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/SimpleTuner/SimpleTuner/helpers/training/trainer.py", line 164, in __init__
    self.parse_arguments(args=config, disable_accelerator=disable_accelerator)
  File "/home/runner/work/SimpleTuner/SimpleTuner/helpers/training/trainer.py", line 202, in parse_arguments
    safety_check(args=self.config, accelerator=self.accelerator)
  File "/home/runner/work/SimpleTuner/SimpleTuner/helpers/training/default_settings/safety_check.py", line 112, in safety_check
    args.flux_schedule_shift is not None and args.flux_schedule_shift > 0
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'MagicMock' and 'int'

@bghira bghira merged commit b90ef0c into bghira:main Oct 29, 2024
1 check passed
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.

2 participants