mnoorchenar commited on
Commit
7cbdfa5
·
1 Parent(s): bb35191

Update 2026-03-26 17:47:33

Browse files
Files changed (1) hide show
  1. templates/pipeline.html +11 -1
templates/pipeline.html CHANGED
@@ -473,7 +473,7 @@ async function openConfig(taskId) {
473
  html += `
474
  <div class="cfg-sec">
475
  <label class="cfg-lbl" for="cfg-ds">Dataset</label>
476
- <select class="cfg-select" id="cfg-ds" onchange="pCtx.dataset=this.value">
477
  ${Object.keys(DATASETS).map(n=>`<option${n===pCtx.dataset?' selected':''}>${n}</option>`).join('')}
478
  </select>
479
  </div>`;
@@ -572,6 +572,16 @@ function _fillAlgos(cat) {
572
  sel.onchange = e => { pCtx.algorithm = e.target.value; };
573
  }
574
 
 
 
 
 
 
 
 
 
 
 
575
  async function onTtChange(tt) {
576
  pCtx.task_type = tt; pCtx.category=''; pCtx.algorithm='';
577
  await _loadAlgos(tt);
 
473
  html += `
474
  <div class="cfg-sec">
475
  <label class="cfg-lbl" for="cfg-ds">Dataset</label>
476
+ <select class="cfg-select" id="cfg-ds" onchange="onDatasetChange(this.value)">
477
  ${Object.keys(DATASETS).map(n=>`<option${n===pCtx.dataset?' selected':''}>${n}</option>`).join('')}
478
  </select>
479
  </div>`;
 
572
  sel.onchange = e => { pCtx.algorithm = e.target.value; };
573
  }
574
 
575
+ function onDatasetChange(name) {
576
+ pCtx.dataset = name;
577
+ const dsTask = (DATASETS[name] || {}).task || 'classification';
578
+ if (dsTask !== pCtx.task_type) {
579
+ pCtx.task_type = dsTask;
580
+ pCtx.category = '';
581
+ pCtx.algorithm = '';
582
+ }
583
+ }
584
+
585
  async function onTtChange(tt) {
586
  pCtx.task_type = tt; pCtx.category=''; pCtx.algorithm='';
587
  await _loadAlgos(tt);