Skip to content

Add YAML file import support to task arguments dialog#1894

Open
Mbeaulne wants to merge 1 commit into03-04-bulk_argument_upload_-_jsonfrom
03-04-bulk_argument_upload_-_yaml
Open

Add YAML file import support to task arguments dialog#1894
Mbeaulne wants to merge 1 commit into03-04-bulk_argument_upload_-_jsonfrom
03-04-bulk_argument_upload_-_yaml

Conversation

@Mbeaulne
Copy link
Collaborator

@Mbeaulne Mbeaulne commented Mar 4, 2026

Description

Added YAML file import support to the SubmitTaskArgumentsDialog component. The dialog now accepts .yaml and .yml files in addition to existing CSV and JSON formats. YAML files are parsed using the js-yaml library and converted to JSON format before processing through the existing argument mapping logic. Added error handling for invalid YAML syntax with appropriate user notifications.

Related Issue and Pull requests

Type of Change

  • Bug fix
  • New feature
  • Improvement
  • Cleanup/Refactor
  • Breaking change
  • Documentation update

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Screenshots (if applicable)

Test Instructions

- experiment_key: "12345"
  predictions: "1234"
  config:
    dslName: experiment_a
    lr: 0.01
    epochs: 100
  tags:
    - production
    - v2
  metadata:
    owner: alice
    team: ml-platform
    priority: 1
  script: "import torch\nmodel = torch.load('checkpoint.pt')\nresults = model.evaluate(dataset='train')"

- experiment_key: "1"
  predictions: "4"
  config:
    dslName: experiment_b
    lr: 0.001
    epochs: 200
  tags:
    - staging
    - v2
  metadata:
    owner: bob
    team: ml-platform
    priority: 2
  script: "from sklearn.ensemble import RandomForestClassifier\nclf = RandomForestClassifier(n_estimators=100, max_depth=5)\nclf.fit(X_train, y_train)"

- experiment_key: "2"
  predictions: "6"
  config:
    dslName: experiment_c
    lr: 0.01
    epochs: 100
    scheduler:
      type: cosine
      warmup_steps: 500
  tags:
    - production
    - v3
  metadata:
    owner: alice
    team: recommendations
    priority: 1
  script: "params = {\"batch_size\": 32, \"dropout\": 0.1}\nrun_training(**params)"

- experiment_key: "9"
  predictions: "5"
  config:
    dslName: experiment_d
    lr: 0.02
    epochs: 50
    scheduler:
      type: linear
      warmup_steps: 100
  tags:
    - canary
  metadata:
    owner: carol
    team: recommendations
    priority: 3
  script: "data = [x for x in range(100) if x % 2 == 0]\nprint(f'filtered {len(data)} items')"
  1. Navigate to the SubmitTaskArgumentsDialog component
  2. Click the import file button
  3. Verify that the file picker now accepts .yaml and .yml files
  4. Test importing a valid YAML file with task arguments
  5. Test importing an invalid YAML file to verify error handling displays the warning message
  6. Confirm that existing CSV and JSON import functionality remains unchanged

Additional Comments

The implementation reuses the existing JSON argument mapping logic by converting YAML to JSON first, ensuring consistency with the current data processing pipeline.

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🎩 To tophat this PR:

You can add the following URL parameter to your browser to tophat this PR:

`?tophat_location=03-04-bulk_argument_upload_-_yaml/f854b08`

Copy link
Collaborator Author

Mbeaulne commented Mar 4, 2026

@Mbeaulne Mbeaulne changed the title bulk argument upload - yaml Add YAML file import support to task arguments dialog Mar 4, 2026
@Mbeaulne Mbeaulne marked this pull request as ready for review March 4, 2026 20:00
@Mbeaulne Mbeaulne requested a review from a team as a code owner March 4, 2026 20:00
@Mbeaulne Mbeaulne force-pushed the 03-04-bulk_argument_upload_-_yaml branch from 1cc2c3f to 18c27ad Compare March 4, 2026 20:43
@Mbeaulne Mbeaulne force-pushed the 03-04-bulk_argument_upload_-_json branch from 64c9574 to f1cd6c2 Compare March 4, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant