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

✨ respect project name #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 5 additions & 4 deletions clearml_session/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ def _get_available_ports(list_initial_ports):
return available_ports


def create_base_task(state, project_name=None, task_name=None):
task = Task.create(project_name=project_name or 'DevOps',
def create_base_task(state, project_name, task_name=None):
task = Task.create(project_name=project_name,
task_name=task_name or 'Interactive Session',
task_type=Task.TaskTypes.application)
task_script = task.data.script.to_dict()
Expand Down Expand Up @@ -1057,7 +1057,7 @@ def setup_parser(parser):
parser.add_argument('--base-task-id', type=str, default=None,
help='Advanced: Set the base task ID for the interactive session. '
'(default: previously used Task). Use `none` for the default interactive session')
parser.add_argument('--project', type=str, default=None,
parser.add_argument('--project', type=str, default="DevOps",
help='Advanced: Set the project name for the interactive session Task')
parser.add_argument('--keepalive', default=False, nargs='?', const='true', metavar='true/false',
type=lambda x: (str(x).strip().lower() in ('true', 'yes')),
Expand Down Expand Up @@ -1086,7 +1086,7 @@ def setup_parser(parser):
parser.add_argument('--yes', '-y',
action='store_true', default=False,
help='Automatic yes to prompts; assume \"yes\" as answer '
'to all prompts and run non-interactively',)
'to all prompts and run non-interactively')


def get_version():
Expand Down Expand Up @@ -1125,6 +1125,7 @@ def cli():
state['verbose'] = args.verbose

state['shell'] = bool(args.shell)
state['project'] = args.project

client = APIClient()

Expand Down