1. 修改了一些bug
2. 做了一些调整,比如启动脚本,支持了tenmsorboard
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>创建训练任务 / 远光软件微调平台</title>
|
||||
<script src="../lib/tailwindcss/tailwind.js"></script>
|
||||
<script>
|
||||
if (typeof console !== 'undefined' && console.warn) {
|
||||
const originalWarn = console.warn;
|
||||
console.warn = function(...args) {
|
||||
if (args[0] && args[0].includes && args[0].includes('cdn.tailwindcss.com')) {
|
||||
return;
|
||||
}
|
||||
originalWarn.apply(console, args);
|
||||
};
|
||||
}
|
||||
</script>
|
||||
<link href="../lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.sidebar-section-title {
|
||||
@@ -111,7 +122,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="nav-item-wrapper">
|
||||
<a href="main.html?page=my-models" data-page="my-models" class="nav-link flex items-center px-4 py-2.5 hover:bg-[#001529]/20 transition-colors">
|
||||
<a href="model-manage.html" data-page="my-models" class="nav-link flex items-center px-4 py-2.5 hover:bg-[#001529]/20 transition-colors">
|
||||
<i class="fa fa-database w-5 text-center"></i>
|
||||
<span class="ml-2">我的模型</span>
|
||||
</a>
|
||||
@@ -662,13 +673,15 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// API 基础地址 - 使用 config.yaml 中的 app.port (7861)
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = getApiBase();
|
||||
// 使用 IIFE 避免全局变量污染
|
||||
(function() {
|
||||
// API 基础地址 - 优先使用 main.html 中定义的全局变量
|
||||
const getApiBase = () => {
|
||||
const protocol = window.location.protocol;
|
||||
const hostname = window.location.hostname;
|
||||
return `${protocol}//${hostname}:7861/api`;
|
||||
};
|
||||
const API_BASE = typeof window.API_BASE !== 'undefined' ? window.API_BASE : getApiBase();
|
||||
|
||||
// 页面加载完成后初始化
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
@@ -1213,9 +1226,9 @@
|
||||
const trainMethod = formData.get('train_method') || 'lora';
|
||||
const methodMap = { 'lora': 'lora', 'full': 'full' };
|
||||
|
||||
// 获取输出模型名称(使用任务名称)
|
||||
// 获取输出模型名称(使用任务名称,路径格式: {train_method}/{taskName})
|
||||
const taskName = formData.get('name') || 'task_name';
|
||||
const outputModelName = taskName;
|
||||
const outputModelName = `${trainMethod}/${taskName}`;
|
||||
const outputDir = outputModelName.startsWith('/') ? outputModelName : `/app/base/saves/${outputModelName}`;
|
||||
|
||||
// 获取数据集名称
|
||||
@@ -1313,6 +1326,12 @@
|
||||
// 初始化时更新一次
|
||||
setTimeout(updateCommandPreview, 500);
|
||||
}
|
||||
|
||||
// 将函数暴露到全局作用域,供 onclick 调用
|
||||
window.toggleGPUSelection = toggleGPUSelection;
|
||||
window.submitForm = submitForm;
|
||||
window.toggleTrainMethod = toggleTrainMethod;
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- 自定义消息弹窗 -->
|
||||
|
||||
Reference in New Issue
Block a user