Source:
<code>public InterpreterResult interpret(String st, InterpreterContext context) throws InterpreterException { String algorithmPath = properties.getProperty( SubmarineConstants.SUBMARINE_ALGORITHM_HDFS_PATH, ""); <START> if (algorithmPath.contains(SubmarineConstants.USERNAME_SYMBOL)) { <END> algorithmPath = algorithmPath.replace(SubmarineConstants.USERNAME_SYMBOL, userName); properties.setProperty(SubmarineConstants.SUBMARINE_ALGORITHM_HDFS_PATH, algorithmPath); } String checkpointPath = properties.getProperty( SubmarineConstants.TF_CHECKPOINT_PATH, ""); if (checkpointPath.contains(SubmarineConstants.USERNAME_SYMBOL)) { checkpointPath = checkpointPath.replace(SubmarineConstants.USERNAME_SYMBOL, userName); properties.setProperty(SubmarineConstants.TF_CHECKPOINT_PATH, checkpointPath); } if (null == submarineInterpreter) { submarineInterpreter = getInterpreterInTheSameSessionByClassName( SubmarineInterpreter.class); submarineInterpreter.setPythonWorkDir(context.getNoteId(), getPythonWorkDir()); } SubmarineJob submarineJob = submarineContext.addOrGetSubmarineJob(this.properties, context); if (null != submarineJob && null != submarineJob.getHdfsClient()) { try { String noteId = context.getNoteId(); List<ParagraphInfo> paragraphInfos = context.getIntpEventClient() .getParagraphList(userName, noteId); submarineJob.getHdfsClient().saveParagraphToFiles( noteId, paragraphInfos, getPythonWorkDir().getAbsolutePath(), properties); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } } return super.interpret(st, context); }</code><technical_language>this piece of code applied in IPySubmarineInterpreter ? IIUC, IPySubmarineInterpreter behave PySubmarineInterpreter more ipython features</technical_language>

Target:
public InterpreterResult interpret(String st, InterpreterContext context) throws InterpreterException { setParagraphConfig(context); String algorithmPath = properties.getProperty( SubmarineConstants.SUBMARINE_ALGORITHM_HDFS_PATH, ""); if (algorithmPath.contains(SubmarineConstants.USERNAME_SYMBOL)) { algorithmPath = algorithmPath.replace(SubmarineConstants.USERNAME_SYMBOL, userName); properties.setProperty(SubmarineConstants.SUBMARINE_ALGORITHM_HDFS_PATH, algorithmPath); } String checkpointPath = properties.getProperty( SubmarineConstants.TF_CHECKPOINT_PATH, ""); if (checkpointPath.contains(SubmarineConstants.USERNAME_SYMBOL)) { checkpointPath = checkpointPath.replace(SubmarineConstants.USERNAME_SYMBOL, userName); properties.setProperty(SubmarineConstants.TF_CHECKPOINT_PATH, checkpointPath); } if (null == submarineInterpreter) { submarineInterpreter = getInterpreterInTheSameSessionByClassName(SubmarineInterpreter.class); if (null != submarineInterpreter) { submarineInterpreter.setPythonWorkDir(context.getNoteId(), getPythonWorkDir()); } } SubmarineJob submarineJob = submarineContext.addOrGetSubmarineJob(this.properties, context); if (null != submarineJob && null != submarineJob.getHdfsClient()) { try { String noteId = context.getNoteId(); List<ParagraphInfo> paragraphInfos = context.getIntpEventClient() .getParagraphList(userName, noteId); submarineJob.getHdfsClient().saveParagraphToFiles( noteId, paragraphInfos, getPythonWorkDir().getAbsolutePath(), properties); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } } return super.interpret(st, context); }