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 tune run not identifying custom components #1617

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
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
6 changes: 6 additions & 0 deletions torchtune/_cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# LICENSE file in the root directory of this source tree.

import argparse
import os
import runpy
import sys
import textwrap
Expand Down Expand Up @@ -167,6 +168,11 @@ def _run_cmd(self, args: argparse.Namespace):
args.recipe = recipe_path
args.recipe_args[config_idx] = config_path

# Make sure user code in current directory is importable
# TODO: This is a temporary fix, figure out how to make runpy and torchrun
# run from this directory
sys.path.append(os.getcwd())

# Execute recipe
if self._is_distributed_args(args):
if not supports_distributed:
Expand Down
Loading