Browse Source

[Fix-15961] [UI] Rename pythonCommand to pythonLauncher in pytorch task. (#16495)

dev
cncws 3 months ago committed by GitHub
parent
commit
e8098ac3b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      dolphinscheduler-ui/src/locales/en_US/project.ts
  2. 4
      dolphinscheduler-ui/src/locales/zh_CN/project.ts
  3. 12
      dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pytorch.ts
  4. 2
      dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts
  5. 2
      dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts
  6. 2
      dolphinscheduler-ui/src/views/projects/task/components/node/types.ts

4
dolphinscheduler-ui/src/locales/en_US/project.ts

@ -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',

4
dolphinscheduler-ui/src/locales/zh_CN/project.ts

@ -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版本',

12
dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-pytorch.ts

@ -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)
@ -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
@ -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')
}
},
{

2
dolphinscheduler-ui/src/views/projects/task/components/node/format-data.ts

@ -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

2
dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts

@ -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: '.'

2
dolphinscheduler-ui/src/views/projects/task/components/node/types.ts

@ -433,7 +433,7 @@ interface ITaskParams {
scriptParams?: string
pythonPath?: string
isCreateEnvironment?: string
pythonCommand?: string
pythonLauncher?: string
pythonEnvTool?: string
requirements?: string
condaPythonVersion?: string

Loading…
Cancel
Save