Skip to content
qgonDEV DOCSSDK 0.3.31
ENKR

SDK index

import qgon and the qgon command in one table. Pick a name to see its signature, notes and where it shows up in the app.

74 shown

NameKindWhat it doesIn the appChanged
qgon.initfunctionStarts a run, after which hyperparameters, console output, plots, models and GPU utilization are recorded on the server; team= sets the team the run counts against (empty: the server decides).Build › Experiments-
qgon.currentfunctionReturns the run started in this process (qgon.init or qgon run), or None if none has started; it still returns that run after run.finish() closes it, but nothing more is recorded to a closed run.Build › Experiments0.3.31
qgon.RunclassA single run (experiment), wrapping the engine's task object.Build › Experiments-
qgon.datasetfunctionReturns a local path to a dataset version and records that version on the active run; a version the device has mounted (Use in workspace on the Datasets screen) is returned as a read-only folder instead of a downloaded copy.Start › Datasets-
qgon.publish_datasetfunctionUploads a folder as a new dataset version and returns the dataset id; with parent_version, only changed files are uploaded.Start › Datasets-
qgon.modelfunctionFinds a model in the model store; download its file with m.get_local_copy().Deploy › Models-
qgon.ModelclassA model in the model store (read-only), returned by qgon.model().Deploy › Models-
qgon.default_queuefunctionReturns the default queue for trials and pipeline steps: the QGON_QUEUE environment variable if set, otherwise gpu (the GPU queue members can use).Build › Scheduling-
qgon.submitfunctionUploads the code in the current folder and runs it on an agent through a queue (default gpu).Build › Scheduling-
qgon.RemoteRunclassA run sent to a queue, with .id, .url, .status(), .wait() and .engine.Build › Scheduling-
qgon.SubmitErrorexceptionRaised when a remote run cannot be sent; the message (in Korean) says why.Build › Scheduling-
qgon.checkpointfunctionSaves a checkpoint and uploads it to the model store, where it appears in the run's checkpoint list in the web app.Build › Experiments-
qgon.resume_pointfunctionReturns the checkpoint to resume training from, or None if there is none.Build › Experiments-
qgon.wait_uploadsfunctionWaits until background uploads (wait=False) finish; it is also called automatically at exit.Build › Experiments-
qgon.CheckpointdataclassThe result of qgon.checkpoint().Build › Experiments-
qgon.ResumePointdataclassA checkpoint to resume training from, returned by qgon.resume_point().Build › Experiments-
qgon.progressfunctionReports progress: step is the number of finished steps, total the overall count (optional) and epoch the current epoch (optional).Build › Scheduling-
qgon.on_yieldfunctionRegisters fn to be called at the next qgon.progress() after a yield request arrives (also usable as a decorator); the process then exits with code 75, right after the upload if fn calls qgon.checkpoint(...), otherwise so that the run resumes from the last checkpoint.Build › Scheduling-
qgon.yield_requestedfunctionTells whether a GPU yield request has arrived for this run, using the value a background thread last read; calling it does not ask the server.Build › Scheduling-
qgon.hpo.uniformfunctionA float between lo and hi; with step, only values on that grid (grid search needs step).Build › Hyperparameter search-
qgon.hpo.log_uniformfunctionA float between lo and hi drawn evenly on a log scale, for values that span orders of magnitude such as a learning rate (for example 1e-4 to 1e-1).Build › Hyperparameter search-
qgon.hpo.integerfunctionAn integer between lo and hi, hi included.Build › Hyperparameter search-
qgon.hpo.choicefunctionOne of the given values.Build › Hyperparameter search-
qgon.hpo.optimizefunctionStarts a search and returns without waiting; call opt.wait() to wait for it.Build › Hyperparameter search0.3.29
qgon.hpo.OptimizationclassA search that is running or has finished.Build › Hyperparameter search-
qgon.hpo.TrialdataclassThe result of one trial.Build › Hyperparameter search-
qgon.hpo.kwargs_from_specfunctionConverts a search spec into optimize() arguments; unknown keys or invalid values raise ValueError with a readable message.Build › Hyperparameter search-
qgon.pipeline.stepdecoratorTurns a function into a pipeline step.Build › Pipelines-
qgon.pipeline.pipelinedecoratorTurns a function into a pipeline; calling it runs the pipeline and returns the last return value.Build › Pipelines0.3.31
qgon.pipeline.run_locallyfunctionMakes pipelines started afterwards run every step in this process, one after another, without a queue (for testing).Build › Pipelines-
qgon.pipeline.debugfunctionMakes pipelines started afterwards run steps as plain function calls without creating step tasks (for debugging).Build › Pipelines-
qgon.pipeline.PipelineRundataclassOne pipeline run.Build › Pipelines-
qgon.pipeline.kwargs_from_specfunctionConverts a pipeline spec into run arguments {name, project, default_queue, steps} with the steps in topological order; an invalid spec raises ValueError with a readable message.Build › Pipelines-
qgon.pipeline.run_specfunctionRuns a pipeline from a spec and waits until it ends, with this process as the controller and the steps on queues.Build › Pipelines0.3.31
qgon.queue.QueueErrorexceptionRaised when the server refuses a request or cannot be reached, with the server's message (in Korean); status is the HTTP status (0 if unreachable, 400 if the SDK rejected it first) and code the server error code.Build › Scheduling-
qgon.queue.QueueUsageErrorexceptionRaised by the SDK before sending when an argument is malformed (task id form, action, state or request number); the CLI exits with code 2.Build › Scheduling-
qgon.queue.orderfunctionReturns the queue order as {queue, admin, entries}; name appears only for your own tasks or to admins, owner_id only to admins, and the default queue is QGON_QUEUE or gpu.Build › Scheduling-
qgon.queue.movefunctionMoves a waiting task.Build › Scheduling-
qgon.queue.urgentfunctionAsks an admin to move your waiting task to the front, with a one-line reason of up to 200 characters; once approved, the task moves to the front and is marked urgent.Build › Scheduling-
qgon.queue.urgent_requestsfunctionLists urgent requests (admins see all, members their own; the latest 200), filtered by state: pending (default), approving, approved, rejected, cancelled or all.Build › Scheduling-
qgon.queue.cancel_urgentfunctionCancels an urgent request you sent, before it is handled, by its request number (the id from urgent_requests()).Build › Scheduling-
qgon.queue.approve_urgentfunction(Admin) Approves an urgent request and moves the task to the front; the result includes position and ran_immediately.Build › Scheduling-
qgon.queue.reject_urgentfunction(Admin) Rejects an urgent request; the order stays as it is.Build › Scheduling-
qgon.queue.statusfunctionReturns the dispatch status, including why tasks are waiting, the running tasks and yields; members see only the position and reason of other users' waiting tasks and none of their running tasks.Build › Scheduling-
qgon.queue.yield_taskfunctionAsks a running GPU task to yield, so it exits after a checkpoint with code 75 and rejoins the queue to resume; admins can ask any task, and owners their own, which then goes to the back of the queue.Build › Scheduling-
qgon.serve.OutputErrorexceptionRaised when the value predict() returns has the wrong shape; the message (in Korean) says where.Deploy › Playground-
qgon.serve.InputclassThe inp argument of predict(model, inp), carrying image, image_bytes, table, params, width and height.Deploy › Playground-
qgon.serve.labelsfunctionClassification output from labels(["cat","dog"], [0.9, 0.1]) or labels([("cat", 0.9), ("dog", 0.1)]), keeping the top_k entries by descending score.Deploy › Playground-
qgon.serve.boxesfunctionDetection output from boxes([{"bbox": [x, y, w, h], "label": "car", "score": 0.8, "rotation": 0}]); with xyxy=True, boxes given as [x1, y1, x2, y2] are converted.Deploy › Playground-
qgon.serve.masksfunctionSegmentation output from masks([{"mask": H×W boolean array | "polygon": [[x1,y1,…]] | "rle": {size, counts}, "label", "score"}]); arrays become COCO compressed RLE (column-major, the same characters as pycocotools) and bbox and area are filled in.Deploy › Playground-
qgon.serve.valuesfunctionValue output (tabular regression and the like): values({"quality": 5.62}) for one row, values({"quality": [5.6, 6.1]}) or values([{"quality": 5.6}, …]) for several rows.Deploy › Playground-
qgon.serve.keypointsfunctionKeypoint output from keypoints([{"keypoints": [[x, y, v], …] or [x1, y1, v1, …], "label": "person", "score": 0.9, "bbox"?: [x, y, w, h], "kp_scores"?: [one 0 to 1 score per point]}], names="coco17").Deploy › Playground-
qgon.serve.imagefunctionA result image your code drew, shown next to the input image; img is a PIL.Image, an H×W or H×W×3/4 uint8 array (NumPy or torch, channels last) or PNG/JPEG bytes, and format is png or jpeg, up to 4096 px on the long side, 4096×4096 pixels in total and 4 MB (larger images must be shrunk or saved as JPEG).Deploy › Playground-
qgon.serve.textfunctionText output (OCR, captions and the like), shown as plain text without HTML or Markdown rendering, up to 100,000 characters.Deploy › Playground-
qgon.serve.combinefunctionBundles several outputs, as in combine(serve.boxes(…), serve.masks(…), serve.image(…)); up to 8 parts, at most 2 of them result images, and no bundle inside a bundle.Deploy › Playground-
qgon.serve.describefunctionDeclares the input kind (image or table) and the class list for the web app's form and legend; features describes table input fields and outputs names the outputs.Deploy › Playground-
qgon.serve.model_filefunctionReturns the model file path in a model folder: the file named in .qgon-model.json, else the only non-hidden file, else the single *.pt file.Deploy › Playground-
qgon.serve.rle_encodefunctionEncodes an H×W boolean array (NumPy, torch or nested lists) as {"size": [H, W], "counts": "<COCO compressed RLE>"}, column-major.Deploy › Playground-
qgon.integrations.hf.resume_dirfunctionReturns the Hugging Face checkpoint folder path (str) for trainer.train(resume_from_checkpoint=...) when the run was started with Resume training, otherwise None; a tar checkpoint is safely extracted into dest (a temporary folder by default), rejecting absolute paths, '..' and links.Build › Scheduling-
qgon.integrations.hf.QgonProgressCallbackclassTrainer callback that reports progress through qgon.progress and handles GPU yield requests.Build › Scheduling0.3.31
qgon.integrations.lightning.QgonProgressCallbackclassLightning callback that reports progress through qgon.progress and handles GPU yield requests.Build › Scheduling0.3.31
qgon.finetune.train_herefunctionTrains from code (the starter template or exported code): inside a run started with qgon.init() it records checkpoints, before/after samples and the adapter output model on that run and resumes when the run was started with Resume training, otherwise it works like train_local.Build › LLM fine-tuning0.3.29
qgon.finetune.train_localfunctionTrains in a local folder without recording a run and returns the result as a dict.Build › LLM fine-tuning0.3.29
qgon.finetune.merge_localfunctionMerges a LoRA adapter into its base model without recording a run, saves only the safetensors, JSON and tokenizer files in out_dir, and returns an info dict.Build › LLM fine-tuning0.3.29
qgon.finetune.normalizefunctionValidates a fine-tuning spec and fills in defaults, returning a new dict; failures raise SpecError naming the field, and params_b (base model size, assumed 7B when unknown) sets the batch and length defaults.Build › LLM fine-tuning-
qgon.finetune.SpecErrorexceptionRaised when a fine-tuning spec is invalid (a ValueError); msg holds the message (in Korean) and field the name of the offending field.Build › LLM fine-tuning0.3.29
qgon.finetune.SPEC_VERSIONconstantThe fine-tuning spec format version this SDK accepts (the spec's v field).Build › LLM fine-tuning0.3.29
qgon runCLIRuns a script with tracking in this workspace, or sends it to a GPU queue to run on an agent.Build › Scheduling-
qgon hpoCLIStarts a hyperparameter search from a JSON spec, with this process running as its controller until the search ends.Build › Hyperparameter search-
qgon pipelineCLIStarts a pipeline from a JSON spec, with this process running as its controller until the pipeline ends.Build › Pipelines-
qgon infoCLIShows the SDK version, the configuration file in use, the device addresses (API, web and file server) and the default queue for qgon run --queue.--
qgon serveCLITests and packages inference code (predict.py) for custom inference code in the Playground.Deploy › Playground-
qgon queueCLIReorders the GPU queue and sends urgent requests and yield requests.Build › Scheduling-
python -m qgon.finetuneCLIThe LLM fine-tuning runner itself: training (SFT-LoRA) and merging.Build › LLM fine-tuning-