Skip to content

Commit

Permalink
[Fix-15961] [UI] Rename pythonCommand to pythonLauncher in pytorch ta…
Browse files Browse the repository at this point in the history
…sk. (apache#16495)
  • Loading branch information
cncws authored Aug 25, 2024
1 parent c99de20 commit e8098ac
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dolphinscheduler-ui/src/locales/en_US/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,8 +875,8 @@ export default {
pytorch_other_params: 'Show More Configurations',
pytorch_python_path: 'Project Path',
pytorch_is_create_environment: 'Create An Environment Or Not',
pytorch_python_command: 'Python Command Path',
pytorch_python_command_tips: 'If empty,will be set $PYTHON_LAUNCHER',
pytorch_python_launcher: 'Python Executable Path',
pytorch_python_launcher_tips: 'If empty,will be set $PYTHON_LAUNCHER',
pytorch_python_env_tool: 'Python Environment Manager Tool',
pytorch_requirements: 'Requirement File',
pytorch_conda_python_version: 'Python Version',
Expand Down
4 changes: 2 additions & 2 deletions dolphinscheduler-ui/src/locales/zh_CN/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ export default {
pytorch_other_params: '展开更多配置',
pytorch_python_path: 'python项目地址',
pytorch_is_create_environment: '是否创建新环境',
pytorch_python_command: 'python命令路径',
pytorch_python_command_tips: '若为空,则使用$PYTHON_LAUNCHER',
pytorch_python_launcher: 'python解释器路径',
pytorch_python_launcher_tips: '若为空,则使用$PYTHON_LAUNCHER',
pytorch_python_env_tool: 'python环境管理工具',
pytorch_requirements: '依赖文件',
pytorch_conda_python_version: 'python版本',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function usePytorch(model: { [field: string]: any }): IJsonItem[] {
const isCreateEnvironmentSpan = ref(0)
const pythonPathSpan = ref(0)
const pythonEnvToolSpan = ref(0)
const pythonCommandSpan = ref(0)
const pythonLauncherSpan = ref(0)
const requirementsSpan = ref(0)
const condaPythonVersionSpan = ref(0)

Expand All @@ -46,7 +46,7 @@ export function usePytorch(model: { [field: string]: any }): IJsonItem[] {
isCreateEnvironmentSpan.value = model.otherParams ? 12 : 0
pythonPathSpan.value = model.otherParams ? 24 : 0
pythonEnvToolSpan.value = model.showCreateEnvironment ? 12 : 0
pythonCommandSpan.value =
pythonLauncherSpan.value =
~model.showCreateEnvironment & model.otherParams ? 12 : 0
requirementsSpan.value = model.showCreateEnvironment ? 24 : 0
condaPythonVersionSpan.value = model.showCreateConda ? 24 : 0
Expand Down Expand Up @@ -93,11 +93,11 @@ export function usePytorch(model: { [field: string]: any }): IJsonItem[] {
},
{
type: 'input',
field: 'pythonCommand',
name: t('project.node.pytorch_python_command'),
span: pythonCommandSpan,
field: 'pythonLauncher',
name: t('project.node.pytorch_python_launcher'),
span: pythonLauncherSpan,
props: {
placeholder: t('project.node.pytorch_python_command_tips')
placeholder: t('project.node.pytorch_python_launcher_tips')
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export function formatParams(data: INodeData): {
taskParams.scriptParams = data.scriptParams
taskParams.pythonPath = data.pythonPath
taskParams.isCreateEnvironment = data.isCreateEnvironment
taskParams.pythonCommand = data.pythonCommand
taskParams.pythonLauncher = data.pythonLauncher
taskParams.pythonEnvTool = data.pythonEnvTool
taskParams.requirements = data.requirements
taskParams.condaPythonVersion = data.condaPythonVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function usePytorch({
timeout: 30,
timeoutNotifyStrategy: ['WARN'],
pythonEnvTool: 'conda',
pythonCommand: '${PYTHON_LAUNCHER}',
pythonLauncher: '${PYTHON_LAUNCHER}',
condaPythonVersion: '3.7',
requirements: 'requirements.txt',
pythonPath: '.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ interface ITaskParams {
scriptParams?: string
pythonPath?: string
isCreateEnvironment?: string
pythonCommand?: string
pythonLauncher?: string
pythonEnvTool?: string
requirements?: string
condaPythonVersion?: string
Expand Down

0 comments on commit e8098ac

Please sign in to comment.