Skip to content

Commit

Permalink
Fixed typos and wording
Browse files Browse the repository at this point in the history
  • Loading branch information
spirali committed Aug 19, 2024
1 parent dd1d978 commit 529ef4e
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 25 deletions.
28 changes: 16 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## New features

* Open jobs. You may dynamically submit into an existing job. See [Open jobs documentation](https://it4innovations.github.io/hyperqueue/stable/jobs/openjobs/)
* It is now possible to dynamically submit new tasks into an existing job (we call this concept "Open jobs").
See [Open jobs documentation](https://it4innovations.github.io/hyperqueue/stable/jobs/openjobs/)

## Fixes

Expand All @@ -13,7 +14,9 @@

## New features

* Server resilience. Server state can be loaded back from a journal when it crashes. This will restore the state of submitted jobs and also autoallocator queues. Find out more [here](https://it4innovations.github.io/hyperqueue/stable/deployment/server/#resuming-stoppedcrashed-server).
* Server resilience. Server state can be loaded back from a journal when it crashes. This will restore the state of
submitted jobs and also autoallocator queues. Find out
more [here](https://it4innovations.github.io/hyperqueue/stable/deployment/server/#resuming-stoppedcrashed-server).

* `HQ_NUM_NODES` for multi-node tasks introduced. It contains the number of nodes assigned to task.
You do not need to manually count lines in `HQ_NODE_FILE` anymore.
Expand Down Expand Up @@ -154,7 +157,7 @@ an old client/worker to a new server (Connecting a new client/worker to an old s

```console
$ hq job submit-file myfile.toml
```
```

* You can now specify (indexed) resource values provided by workers as strings (previously only
integers were allowed). Notably, automatic detection of Nvidia GPUs specified with string UUIDs
Expand Down Expand Up @@ -521,7 +524,7 @@ would pass `OMP_NUM_THREADS=4` to the executed `<program>`.
```bash
# Print stdout of all tasks of job 1
$ hq job cat 1 stdout
# Print stderr of tasks 1, 2, 3 of job 5
$ hq job cat 5 stderr --tasks 1-3
```
Expand Down Expand Up @@ -568,6 +571,7 @@ would pass `OMP_NUM_THREADS=4` to the executed `<program>`.
* You can now generate shell completion using the `hq generate-completion <shell>` command.

## Changes

### CLI

* The command line interface for jobs has been changed to be more consistent with the interface for
Expand All @@ -576,14 +580,14 @@ would pass `OMP_NUM_THREADS=4` to the executed `<program>`.
is `hq submit`, which is now a shortcut for `hq job submit`. Here is a table of changed commands:

| **Previous command** | **New command** |
|------------------|--------------------|
| `hq jobs` | `hq job list` |
| `hq job` | `hq job info` |
| `hq resubmit` | `hq job resubmit` |
| `hq cancel` | `hq job cancel` |
| `hq wait` | `hq job wait` |
| `hq progress` | `hq job progress` |
| `hq submit` | `hq submit` or `hq job submit` |
|----------------------|--------------------|
| `hq jobs` | `hq job list` |
| `hq job` | `hq job info` |
| `hq resubmit` | `hq job resubmit` |
| `hq cancel` | `hq job cancel` |
| `hq wait` | `hq job wait` |
| `hq progress` | `hq job progress` |
| `hq submit` | `hq submit` or `hq job submit` |

* The `--tasks` flag of the `hq job info <job-id>` command has been removed. If you want to display the
individual tasks of a job, please use the `hq task list <job-id>` command.
Expand Down
4 changes: 2 additions & 2 deletions crates/hyperqueue/src/client/commands/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct JobCancelOpts {

#[derive(Parser)]
pub struct JobCloseOpts {
/// Select job(s) to cancel
/// Select job(s) to close
#[arg(value_parser = parse_last_all_range)]
pub selector: IdSelector,
}
Expand Down Expand Up @@ -291,7 +291,7 @@ pub async fn close_job(
responses.sort_unstable_by_key(|x| x.0);

if responses.is_empty() {
log::info!("There is nothing to cancel")
log::info!("There is nothing to close")
}

for (job_id, response) in responses {
Expand Down
2 changes: 0 additions & 2 deletions crates/hyperqueue/src/client/commands/submit/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,6 @@ fn get_ids_and_entries(opts: &JobSubmitOpts) -> anyhow::Result<(IntArray, Option
Ok((ids, entries))
}

//IntArray::from_range(0, entries.len() as JobTaskCount)

/// Warns the user that an array job might produce too many files.
fn warn_array_task_count(opts: &JobSubmitOpts, task_count: u32) {
if task_count < 2 {
Expand Down
2 changes: 1 addition & 1 deletion crates/hyperqueue/src/common/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ pub enum JobCommand {
TaskIds(JobTaskIdsOpts),
/// Open new job (without attaching any tasks yet)
Open(SubmitJobConfOpts),
/// Close a session job
/// Close an open job
Close(JobCloseOpts),
}

Expand Down
23 changes: 15 additions & 8 deletions docs/jobs/openjobs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Open jobs

By default, a job is a set of tasks that are created atomically during a submit, and no other task can be added to the job.
We call this job *closed*. In contrast, HQ allows you to create an *open* job that allows new tasks to be submitted as long as it is open.
By default, a job is a set of tasks that are created atomically during a submit, and no other task can be added to the
job.
We call this job *closed*. In contrast, HQ allows you to create an *open* job that allows new tasks to be submitted as
long as it is open.

## Opening a job

Expand All @@ -11,7 +13,7 @@ A job can be opened by the following command:
$ hq job open
```

If openning was successfull:
If opening was successful, this will be printed:

```
Job <ID> is open.
Expand All @@ -27,7 +29,9 @@ Note: In the list of jobs, an open job is marked with "*" before the id.

## Submitting tasks into open jobs

A submit to an open job is the same as a normal submit, except that you must specify the job you are submitting to with the `--job` argument. You may submit multiple times into the same job. Tasks are scheduled to the workers immediately when they are received by the server.
A submit to an open job is the same as a normal submit, except that you must specify the job you are submitting to with
the `--job` argument. You may submit multiple times into the same job. Tasks are scheduled to the workers immediately
when they are received by the server.

```
$ hq submit --job <JOB_ID> ... other submit args ...
Expand All @@ -37,7 +41,8 @@ $ hq submit --job <JOB_ID> ... other submit args ...

## Task Ids

All tasks in one job shares the task you space. When you do not specify task ids, HQ automatically assigns a smallest ID that is bigger then any existing task id.
All tasks in one job share the task ID space. When you do not specify task ids, HQ automatically assigns a smallest ID
that is bigger then any existing task id.

```commandline
$ hq job open
Expand All @@ -62,7 +67,8 @@ $ hq submit --job <JOB_ID> --array 0-12 -- hostname

## Job name and `--max-fails`

Job's name and configuration open `--max-fails` are the property of the job. They can be set when job is opened and they cannot be later changed. Submits options `--name` and `--max-fails` are ignored if you are submitting into an open job.
Job's name and configuration open `--max-fails` are the property of the job. They can be set when job is opened and they
cannot be later changed. Submits options `--name` and `--max-fails` are ignored if you are submitting into an open job.

```commandline
# Configuring jobs's name and max fails
Expand All @@ -74,10 +80,11 @@ $ hq submit --job <JOB_ID> --max-fails=5 ...

## Submit file into open job

Submitting job definition file into an open job works in the similar way as a normal submit, you just need to add `--job` parameter.
Submitting job definition file into an open job works in the similar way as a normal submit, you just need to
add `--job` parameter.

```commandline
$ hq job submit-file --job <JOB_ID> job-defition.toml
$ hq job submit-file --job <JOB_ID> job-definition.toml
```

## Closing job
Expand Down

0 comments on commit 529ef4e

Please sign in to comment.