Skip to content

Commit

Permalink
docs: moved documentation from README to loaders yml and docs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Jan 25, 2025
1 parent 1257157 commit c1b7965
Show file tree
Hide file tree
Showing 14 changed files with 392 additions and 175 deletions.
129 changes: 1 addition & 128 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,134 +115,7 @@ dyana trace ... --allow-volume-write

## Loaders

Dyana provides a set of loaders for different types of files, each loader has a dedicated set of arguments and will be executed in an isolated, offline by default container. Click on a loader to see the arguments and examples.

<details>
<summary><b>automodel</b></summary>

The default loader for machine learning models. It will load any model that is compatible with [AutoModel and AutoTokenizer](https://huggingface.co/transformers/v3.0.2/model_doc/auto.html).

```bash
dyana trace --loader automodel --model /path/to/model --input "This is an example sentence."

# automodel is the default loader, so this is equivalent to:
dyana trace --model /path/to/model --input "This is an example sentence."

# in case the model requires extra dependencies, you can pass them as:
dyana trace --model tohoku-nlp/bert-base-japanese --input "This is an example sentence." --extra-requirements "protobuf fugashi ipadic"

# to perform tokenizer and model initialization without loading weights.
dyana trace --model /path/to/model --low-memory
```
</details>

<details>
<summary><b>lora</b></summary>

Loads PEFT compatible LoRA adapters.

```bash
dyana trace --loader lora --adapter /path/to/adapter
```
</details>

<details>
<summary><b>elf</b></summary>
This loader will load an ELF file and run it.

```bash
dyana trace --loader elf --elf /path/to/linux_executable

# depending on the ELF file and the host computer, you might need to specify a different platform:
dyana trace --loader elf --elf /path/to/linux_executable --platform linux/amd64

# networking is disabled by default, if you need to allow it, you can pass the --allow-network flag:
dyana trace --loader elf --elf /path/to/linux_executable --allow-network
```
</details>

<details>
<summary><b>pickle</b></summary>
This loader will load a Pickle serialized file.

```bash
dyana trace --loader pickle --pickle /path/to/file.pickle

# networking is disabled by default, if you need to allow it, you can pass the --allow-network flag:
dyana trace --loader pickle --pickle /path/to/file.pickle --allow-network
```
</details>

<details>
<summary><b>python</b></summary>
This loader will load a Python file and run it.

```bash
dyana trace --loader python --script /path/to/file.py

# networking is disabled by default, if you need to allow it, you can pass the --allow-network flag:
dyana trace --loader python --script /path/to/file.py --allow-network
```
</details>

<details>
<summary><b>pip</b></summary>
This loader will install a Python package via PIP.

```bash
dyana trace --loader pip --package requests

# you can install a specific version of a package:
dyana trace --loader pip --package requests==2.28.2

# you can also pass extra dependencies to be installed:
dyana trace --loader pip --package foobar --extra-dependencies "gcc"
```
</details>

<details>
<summary><b>js</b></summary>
This loader will load a Javascript file and run it via NodeJS.

```bash
dyana trace --loader js --script /path/to/file.js

# networking is disabled by default, if you need to allow it, you can pass the --allow-network flag:
dyana trace --loader js --script /path/to/file.js --allow-network
```
</details>

<details>
<summary><b>npm</b></summary>
This loader will install a Javascript package via NPM.

```bash
dyana trace --loader npm --package express

# you can install a specific version of a package:
dyana trace --loader npm --package express@1.0.0

# you can also pass extra dependencies to be installed:
dyana trace --loader npm --package express --extra-dependencies "axios"
```

</details>

<details>
<summary><b>website</b></summary>
Opens a website in a headless browser and profiles its performance.

```bash
dyana trace --loader website --url https://www.google.com

# you can also save a screenshot of the page
dyana trace --loader website --url https://www.google.com --screenshot

# you can also wait for a specific element to load
dyana trace --loader website --url https://www.google.com --wait-for "body"
```

</details>
Dyana provides a set of loaders for different types of files, each loader has a dedicated set of arguments and will be executed in an isolated, offline by default container. Refer to the [documentation](https://docs.dreadnode.io/dyana/) for more information.

## License

Expand Down
Loading

0 comments on commit c1b7965

Please sign in to comment.