Skip to content
qgonDEV DOCSSDK 0.3.31
ENKR

Your first run

In the appOverview·Start › Starter templates·Manage › Workspaces·Build › Scheduling·Build › ExperimentsExamples checked on SDK 0.3.29

Follow this page to sign in to the server, run your first experiment from a starter template, send your own code to the GPU queue and see the result on the experiments screen. The first time, going through it in order is the fastest way.

Get three things from your server administrator.

  • The server web address. It looks like http://<server address>:<web port>, and the default web port is 2551.
  • Your username and initial password.
  • A workspace you are a member of.

Without a workspace you have nowhere to write code or send training from. Ask your administrator to create a workspace and add you as a member.

  1. Open the server web address in a browser and sign in with the username and password you received.
  2. Change the initial password right away in Settings › Profile · environment.
  3. Look at the Get started card at the top of Overview. It has four rows: connect the SDK, create a dataset, first experiment from a template and open a workspace. The card disappears once all four are done.
Home screen of a new member account. In the Get started card at the top, Connect the SDK and Create a dataset are marked Done out of four rows. An SDK code sample sits to the right of the card, with job counts and the My team line below
In the Get started card, finished rows say Done and the rest say To do.View full size(opens in a new tab)

A workspace is your development server inside the server. You write code, look at data and send training from here.

  1. Pick your workspace in Manage › Workspaces. If it is stopped, start it. Starting and stopping is the workspace manager's job, so as a member ask the manager.
  2. On the Access tab, press Set up access once. This creates your Linux account and your workspace key inside the workspace.
  3. Press Open web IDE. VS Code opens in a new tab. Enter My password from the Access tab.

The SDK and the qgon command are already set up in the web IDE terminal, so you do not install anything or add a key. To get in with JupyterLab or SSH from your PC, see Connect to the server.

Starter templates are training examples that ship with the server. A template copies its code into your home folder and fills in the New run form for you. The result is recorded like any other experiment, so you can compare it or use it for hyperparameter search right away.

  1. Pick a template in Start › Starter templates. Requirements in the side panel shows whether the datasets and environment it needs are ready. If a row is not ready, tell your administrator.
  2. Under Start, choose a preset and a workspace. Quick try uses fewer epochs, so the first result comes sooner.
  3. Press Copy code and open run settings. The code is copied under templates/ in your home folder, and the New run form opens with its values filled in.
  4. If the environment step of the form shows "No saved environment", go to the Environment tab on the workspace screen and press Save environment once. Only a workspace manager can save an environment.
  5. Press Run.
The starter templates screen. Each template card shows its kind, the expected time per preset, the main metric and whether it is ready
Quick try is the shortest preset on every card. Start with it to see a result sooner.View full size(opens in a new tab)

Which templates you see depends on the server. Templates an administrator has hidden do not appear. The LLM fine-tuning template does not copy code. It opens the LLM fine-tuning screen with the values filled in.

The run you just sent shows up in Build › Scheduling. If the agents are busy, it waits its turn on the Waiting tab, and a number shows its place in line. Once an agent picks it up, it moves to the Running tab, where progress and elapsed time appear. Finished runs collect on the Recently finished tab.

If a run failed, expand Why failed on its row. You see the exit reason and the last console lines. The cause is usually near the bottom.

The Running tab of the scheduling screen. The GPU memory (unified) bar is at the top, with the Waiting, Running and Recently finished tabs and a table of jobs below
Switch between Waiting, Running and Recently finished with the tabs above the table. The Running tab shows progress and elapsed time.View full size(opens in a new tab)

Once the template has run, send your own code. The train.py below records computed values instead of real training. Add qgon.init() and the logging lines to your own training code and it works the same way.

train.py
import math
import qgon
run = qgon.init(project="Sandbox", name="first-run")
cfg = run.params({"lr": 0.01, "epochs": 5}) # hyperparameters
for ep in range(cfg["epochs"]):
loss = math.exp(-cfg["lr"] * 50 * (ep + 1)) # stands in for real training
acc = 1.0 - loss
run.log_metrics({"loss": loss, "acc": acc}, step=ep, prefix="val") # charts val/loss, val/acc
run.summary("val/acc", acc) # final value to compare in the experiment list

Run it briefly in the workspace first with python train.py to catch code errors early. That run is recorded as an experiment too, so check the result and then send it to the GPU queue.

  1. In the web IDE terminal, create a project folder and put train.py in it. You cannot send from your home folder, where the terminal first opens.
    mkdir -p ~/first-run && cd ~/first-run
  2. See what will be uploaded first. This command sends nothing.
    qgon run --queue gpu --dry-run -- python train.py
  3. Send it to the queue. When a run id and a screen address appear, it has been sent.
    qgon run --queue gpu -- python train.py

Put options such as --queue right after qgon run, before the command to run. If you put them after, as in qgon run python train.py --queue gpu, they become script arguments and the script simply runs in this workspace. With --wait, the command follows the log and exits with the run's exit code when the run ends.

In a git repository, committed files and uncommitted changes are both uploaded. Secret files such as .env, keys and certificates are left out, as are checkpoints and large files. If there is a requirements.txt, it is installed before the run. Do not send training data along with the code. Read it as a dataset instead. The full upload rules and exit codes are in Run training on the GPU queue.

Build › Experiments lists experiments one per row. Each row shows the name, the settings that differ within this list, the main metric and the status. Click a row to open the Summary · Graphs · Log · Files · models · Checkpoints tabs on the right.

The experiments screen. The experiment list is on the left, and the selected experiment's summary and learning curves are on the right
The selected row has a green bar on its left. Change what the right panel shows with the tabs at its top.View full size(opens in a new tab)

If you sent the example above, the Graphs tab shows one val chart with loss and acc lines in it. For a run sent to the queue, Re-run with changes in the details lets you change values and send it again. Select two or more experiments and compare them to see setting differences and learning curves side by side. The comparison screen is in English.