Skip to content

Conversation

tonyhoo
Copy link
Collaborator

@tonyhoo tonyhoo commented Mar 6, 2025

This reverts commit 626abf7.

Issue #, if available:
N/A

Description of changes:
Reverting changes to full_install.sh that added cd "$script_dir". This change caused problems with editable installations in Colab environments, where the src-layout structure combined with changing directories resulted in Python being unable to find the correct modules.

The revert ensures that users installing AutoGluon from source in Colab can properly import modules like TabularPredictor without additional workarounds. This issue primarily affects researchers and developers who install from source in notebook environments.

Testing verified at: Colab

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

full_install.sh Outdated
Comment on lines 4 to 9
# Get the directory of the script
script_dir=$(dirname "$0")

# Change the current directory to the script's directory
cd "$script_dir"

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe instead we only do this logic if not in a colab environment, instead of removing it?

Alternative, don't remove it, but if colab, force --non-editable flag setting. This should also fix the issue, since there is no need to have editable install in colab.

Copy link

github-actions bot commented Mar 7, 2025

Job PR-4964-0e03412 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4964/0e03412/index.html

@tonyhoo tonyhoo changed the title Revert "Make full_install.sh working dir -> script dir (#4933)" Fix source installation issue on colab Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

Job PR-4964-ca6900a is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4964/ca6900a/index.html

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

Job PR-4964-f71b0d3 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4964/f71b0d3/index.html

@tonyhoo
Copy link
Collaborator Author

tonyhoo commented Mar 11, 2025

/platform_tests 448150b
Platform Tests Output

Copy link

Job PR-4964-448150b is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4964/448150b/index.html

full_install.sh Outdated
echo "Colab detected - forcing non-editable install"
else
EDITABLE="true"
cd "$script_dir"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we try moving the cd "$script_dir" outside of the if/else, so it always happens? This should fix the below:

Ideally this should work in colab:

!git clone -b revert_change https://github.com/tonyhoo/autogluon.git
!./autogluon/full_install.sh

But it doesn't currently:

error: Distribution not found at: file:///content/common

@tonyhoo
Copy link
Collaborator Author

tonyhoo commented Mar 11, 2025

/platform_tests 5ea605f
Platform Tests Output

Copy link
Contributor

@Innixma Innixma left a comment

Choose a reason for hiding this comment

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

Works on colab!

Copy link

Job PR-4964-5ea605f is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-4964/5ea605f/index.html

@Innixma Innixma merged commit 3494f41 into autogluon:master Mar 11, 2025
27 checks passed
@tonyhoo tonyhoo deleted the revert_change branch March 12, 2025 18:06
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