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: bug with AIM server availability check #139

Conversation

HarikrishnanBalagopal
Copy link
Contributor

@HarikrishnanBalagopal HarikrishnanBalagopal commented Apr 25, 2024

Description of the change

Fixes the bug in #131

Related issue number

#131

How to verify the PR

Run an end-to-end test using https://github.com/foundation-model-stack/fms-hf-tuning/blob/main/tuning/sft_trainer.py in a venv or conda environment which has the AIM package installed. Even without an AIM server running the training should succeed.

Was the PR tested

  • I have added >=1 unit test(s) for every new method I have added.
  • I have ensured all unit tests pass

@dushyantbehl
Copy link
Contributor

@HarikrishnanBalagopal I believe we do not need so much changes to the code. The idea is if Aim is installed but AIMSTACK_DB and AIMSTACK_SERVER are not set then we should not use Aim.

Just change this one line

  if aim_server:
        aim_callback = AimCallback(
            repo="aim://" + aim_server + "/", experiment=aim_experiment
        )
    if aim_db:
        aim_callback = AimCallback(repo=aim_db, experiment=aim_experiment)
   else:
-       aim_callback = AimCallback(experiment=aim_experiment)
+       aim_callback = None

@HarikrishnanBalagopal
Copy link
Contributor Author

HarikrishnanBalagopal commented Apr 30, 2024

@HarikrishnanBalagopal I believe we do not need so much changes to the code. The idea is if Aim is installed but AIMSTACK_DB and AIMSTACK_SERVER are not set then we should not use Aim.

Just change this one line

  if aim_server:
        aim_callback = AimCallback(
            repo="aim://" + aim_server + "/", experiment=aim_experiment
        )
    if aim_db:
        aim_callback = AimCallback(repo=aim_db, experiment=aim_experiment)
   else:
-       aim_callback = AimCallback(experiment=aim_experiment)
+       aim_callback = None

I think that will also require a change here to avoid adding a None into the list of callbacks

callbacks.append(get_aimstack_callback())

@dushyantbehl
Copy link
Contributor

Wait for #89 which fixes this.

@HarikrishnanBalagopal HarikrishnanBalagopal force-pushed the fix/aimcheck branch 2 times, most recently from 83963c8 to 1d0a6cf Compare May 3, 2024 09:48
@HarikrishnanBalagopal
Copy link
Contributor Author

HarikrishnanBalagopal commented May 3, 2024

Wait for #89 which fixes this.

Sure, I have made the requested change in this PR as well.

Signed-off-by: Harikrishnan Balagopal <[email protected]>
@anhuong
Copy link
Collaborator

anhuong commented May 7, 2024

if this is in #89 perhaps we can close this PR

@ashokponkumar
Copy link
Collaborator

@HarikrishnanBalagopal If #89 fixes this issue, lets close this PR. Thanks @anhuong !

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.

4 participants