Skip to main content

Deprecations

Project Context

From Anyscale CLI release 0.5.4 onwards, project contexts will be deprecated. Project contexts will continue to work for the next few months, and we plan to remove this functionality in April 2022. This deprecation affects CLI commands and calls to Anyscale Ray Client. Warning messages with migration instructions will be printed for the affected commands if a project context is currently used.

Migration Instructions

Creating Projects

anyscale project init was previously used to create projects for an Anyscale user account, or attach a local project directory to an Anyscale project. This command would make sure the .anyscale.yaml file was correctly created and formatted so a project context could be defined for the local directory.

Going forward, anyscale project init will be deprecated and anyscale project create can be used to create a project in Anyscale. anyscale project create will not set any state that allows commands to execute in the project context, so the project information should either be specified through the command arguments or through the ANYSCALE_PROJECT_NAME environment variable.

CLI Commands

Some of the CLI commands like anyscale cluster start and anyscale job submit interact with a project. Previously, if the directory these commands were run in contained a project context through the .anyscale.yaml file, the command would be executed using that project.

The project information should now be specified to these commands through the --project-id or --project-name arguments, or the ANYSCALE_PROJECT_NAME environment variable. For example:

$ anyscale cluster start --project-id prj_fBKGnY6s8XnpGMQ1AxpFv22G
$ ANYSCALE_PROJECT_NAME="my_project" anyscale cluster start

For anyscale job submit and anyscale service deploy, the project information can be specified in the configuration yaml file with the project_id field. If ANYSCALE_PROJECT_NAME is set, it will override the value in the configuration file.

The commands will run without a project if the project information is not provided by the user.