Skip to content

Commit

Permalink
renamed doc to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
visualDust committed Nov 27, 2023
1 parent 1b8235d commit 502fa1f
Show file tree
Hide file tree
Showing 43 changed files with 53 additions and 54 deletions.
1 change: 0 additions & 1 deletion doc/docs/guide/neetcli/workspace.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

NEETBOX daemon consists of client side and server side. While client side syncs status of running project and platform information including hardware, server side provides apis for status monitoring and websocket forcasting between client and frontends.

Basically neetbox will also launch a backend on localhost when a project launching configured with daemon server address at localhost. The server will run in background without any output, and you may want to run a server with output for debug purposes.
Basically neetbox will also launch a backend on localhost when a project launching configured with daemon server address at localhost. The server will run in background without any output, and you may want to run a server with output for debug purposes.

## How to test neetbox server

Expand Down
2 changes: 1 addition & 1 deletion doc/docs/develop/index.md → docs/docs/develop/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
sidebar_position: 1
---

# Develop
# Develop
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
sidebar_position: 2
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ In the configuration file, there are 4 default feild:
- __logging__ for configuring `neetbox.logging`
- __pipeline__ for configuring `neetbox.pipeline`
- __integrations__ for configuring `neetbox.integrations`
- __daemon__ for configuring `neetbox.daemon`
- __daemon__ for configuring `neetbox.daemon`
4 changes: 2 additions & 2 deletions doc/docs/guide/index.md → docs/docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ pip install --index-url https://pypi.org/simple/ neetbox --force-reinstall --no-
- [x] [Dev APIs](/docs/develop/) join us.

:::caution
Another problem here is that since the repository is still under construction, most of the codes do not have related docs. Sorry that some of the codes are massed up without regular comments on them. The docs will appear soon.
Another problem here is that since the repository is still under construction, most of the codes do not have related docs. Sorry that some of the codes are massed up without regular comments on them. The docs will appear soon.
:::

## Useless wordy things

__NEETBox contains useless code snippets for Deep Learning Researchers.__ The repository itself is still under construction and for now it has not much code inside. Nevertheless, we are always adding new code snippets.
__NEETBox contains useless code snippets for Deep Learning Researchers.__ The repository itself is still under construction and for now it has not much code inside. Nevertheless, we are always adding new code snippets.

So here is the thing: I'm new to complex Computer Vision projects and I found myself writing duplicate codes somehow, about convolutional neural networking, figure ploting(for paper writing), visualizing, data processing, etc., in different projects. So I'm going to have code snippets for myself and for other beginners who would like to have one. Certainly there are a lot of extraordinarily frameworks with high performance models integrated in their model hub (or stuff like that). However, that's not what I really want. Personally, I would like to have a collection of standalone code snippets which you can easily plug into your code without importing heavy dependency or doing code migration.

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ sidebar_position: 6
---

# Integrations

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ sidebar_position: 2

# Advanced logging config

working on the doc...
working on the doc...
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ logger.log("hello", world)
```
output:
```bash
2023-03-18-13:56:03 > test.py > hello world
2023-03-18-13:56:03 > test.py > hello world
```

## Using a decorator
Expand Down Expand Up @@ -76,8 +76,8 @@ a = get_instance_of_A()
```
output:
```bash
2023-03-18-13:57:47 > test.py/get_instance_of_A > Buidling AClass Instance...
2023-03-18-13:57:47 > AClass/__init__ > Class A Ready.
2023-03-18-13:57:47 > test.py/get_instance_of_A > Buidling AClass Instance...
2023-03-18-13:57:47 > AClass/__init__ > Class A Ready.
2023-03-18-13:57:47 > AClass/post_processing > Running PostProcessing...
```

Expand All @@ -89,7 +89,7 @@ logger.log("some message")
```
output:
```bash
2023-03-18-13:58:40 > identity name > some message
2023-03-18-13:58:40 > identity name > some message
```

## Log into files
Expand All @@ -102,13 +102,13 @@ logger.log("this message will be written to stdout only", into_file=False)
```
output:
```bash
[INFO]2023-03-18-14:29:59 > neetbox.logging.logger/Logger/info > Directory ./logdir not found, trying to create.
2023-03-18-14:29:59 > test.py > this message will be written to both stdout and file
2023-03-18-14:29:59 > test.py > this message will be written to stdout only
[INFO]2023-03-18-14:29:59 > neetbox.logging.logger/Logger/info > Directory ./logdir not found, trying to create.
2023-03-18-14:29:59 > test.py > this message will be written to both stdout and file
2023-03-18-14:29:59 > test.py > this message will be written to stdout only
```
in `./logdir/2023-03-18.log`:
```
2023-03-18-14:29:59 | test.py | this message will be written to both stdout and file
2023-03-18-14:29:59 | test.py | this message will be written to both stdout and file
```

Expand All @@ -124,7 +124,7 @@ logger.log("some message", with_datetime=False)
```
output:
```
test.py > some message
test.py > some message
```

The same thing, if you want to log without identifier:
Expand All @@ -133,7 +133,7 @@ logger.log("some message", with_identifier=False)
```
output:
```
2023-03-18-14:44:22 > some message
2023-03-18-14:44:22 > some message
```

Looking for advanced format control? See [advanced logging format](./config-logger.md)
Looking for advanced format control? See [advanced logging format](./config-logger.md)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SomeClass:
def __init__(self) -> None:
self.logger = logger(self)
self.logger.log("something")

SomeClass()
```
output:
Expand All @@ -55,8 +55,8 @@ b()
```
output:
```
2023-03-18-22:48:15 > someone/a > a
2023-03-18-22:48:15 > someone/b > b
2023-03-18-22:48:15 > someone/a > a
2023-03-18-22:48:15 > someone/b > b
```
Check the code and run it by yourself. You will find the two lines in the output with different colors. This may be confusing, but it is not a bug. The feature was designed because you still want to distinguish between the two lines since they have different function names, right?

Expand All @@ -75,8 +75,8 @@ logger_another.log("message from", logger_another)
```
output:
```
2023-03-18-22:12:20 > None/ > message from <neetbox.logging.logger.Logger object at 0x00000217D7F60670>
2023-03-18-22:12:20 > None/ > message from <neetbox.logging.logger.Logger object at 0x00000217D7F60670>
2023-03-18-22:12:20 > None/ > message from <neetbox.logging.logger.Logger object at 0x00000217D7F60670>
2023-03-18-22:12:20 > None/ > message from <neetbox.logging.logger.Logger object at 0x00000217D7F60670>
```
As you can see, they are the same object.

Expand All @@ -94,8 +94,8 @@ logger2.log("from", logger2)
```
output:
```
2023-03-18-22:31:33 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000217D8130820>
2023-03-18-22:31:33 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000217D81303D0>
2023-03-18-22:31:33 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000217D8130820>
2023-03-18-22:31:33 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000217D81303D0>
```
As you can see, they are different objects even though they have the same identifier. One was called `Logger object at 0x00000217D8130820` and the other was `Logger object at 0x00000217D81303D0`. But if you are using a console, you will see that they are painted the same color. This is because you did not pass a specific `LogStyle` when constructing the logger, it will use automatically generated style specified by their caller identity.

Expand All @@ -110,19 +110,19 @@ logger2.log("from", logger2)
```
output:
```
[INFO]2023-03-18-22:40:21 > neetbox.logging.logger/Logger/info > Directory ./logdir1 not found, trying to create.
[INFO]2023-03-18-22:40:21 > neetbox.logging.logger/Logger/info > Directory ./logdir2 not found, trying to create.
2023-03-18-22:40:21 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000201B7D116A0>
2023-03-18-22:40:21 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000201B7D11070>
[INFO]2023-03-18-22:40:21 > neetbox.logging.logger/Logger/info > Directory ./logdir1 not found, trying to create.
[INFO]2023-03-18-22:40:21 > neetbox.logging.logger/Logger/info > Directory ./logdir2 not found, trying to create.
2023-03-18-22:40:21 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000201B7D116A0>
2023-03-18-22:40:21 > the_same_identity/ > from <neetbox.logging.logger.Logger object at 0x00000201B7D11070>
```
output in `./logdir1/2023-03-18.log`:
```
2023-03-18-22:40:21 | the_same_identity/ | from <neetbox.logging.logger.Logger object at 0x00000201B7D116A0>
2023-03-18-22:40:21 | the_same_identity/ | from <neetbox.logging.logger.Logger object at 0x00000201B7D116A0>
```
output in `./logdir2/2023-03-18.log`:
```
2023-03-18-22:40:21 | the_same_identity/ | from <neetbox.logging.logger.Logger object at 0x00000201B7D11070>
2023-03-18-22:40:21 | the_same_identity/ | from <neetbox.logging.logger.Logger object at 0x00000201B7D11070>
```
:::

This is not a bug. The feature was designed because someone needs to log different things into different files using the same caller identity.
This is not a bug. The feature was designed because someone needs to log different things into different files using the same caller identity.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 5

# The NEETBOX cli

The NEETBOX cli helps you to manage your codes, datasets, experiments and more.
The NEETBOX cli helps you to manage your codes, datasets, experiments and more.

## Get started

Expand All @@ -14,9 +14,9 @@ After installing neetbox, at your working directory, try:
neet init
```

NEETBOX then generate a config file namingly "neetbox.toml" as your workspace config.
NEETBOX then generate a config file namingly "neetbox.toml" as your workspace config.

NEETBOX gather information from your project as if you import neetbox or use [@watch](/docs/guide/pipeline/watch_and_listen.md) in your code.
```bash
neet status
```
```
1 change: 1 addition & 0 deletions docs/docs/guide/neetcli/workspace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Manage workspace
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sidebar_position: 4

Pipeline provides useful tools for building your training or inferencing procedure.

- [x] [@watch and @listen](/docs/guide/pipeline/watch_and_listen.md)
- [x] [@watch and @listen](/docs/guide/pipeline/watch_and_listen.md)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sidebar_position: 1

Blocks available for now:

- [x] [Simple ResBlock](./resblock)
- [x] [Simple ResBlock](./resblock)
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';


A 3x3 `ResBlock` with residual, no down-sample
A 3x3 `ResBlock` with residual, no down-sample

<Tabs>
<TabItem value="code">

```python
model = cnn.ResBlock(inplanes=64, outplanes=128, kernel_size=3, stride=1, residual=True)
```

</TabItem>
<TabItem value="model structure">

Expand All @@ -89,9 +89,9 @@ ResBlock(
```

</TabItem>
</Tabs>
</Tabs>

A 5x5 `ResBlock` using dilation convolution(dilation rate = 2) without residual, 2 times down-sample
A 5x5 `ResBlock` using dilation convolution(dilation rate = 2) without residual, 2 times down-sample

<Tabs>
<TabItem value="code">
Expand All @@ -101,7 +101,7 @@ model = cnn.ResBlock(
inplanes=64, outplanes=128, kernel_size=5, stride=2, residual=False, dilation=2
)
```

</TabItem>
<TabItem value="model structure">

Expand All @@ -118,7 +118,7 @@ ResBlock(
</TabItem>
</Tabs>

A 7x7 `ResBlock` using spatial-separable convolution without residual, 2 times down-sample
A 7x7 `ResBlock` using spatial-separable convolution without residual, 2 times down-sample

<Tabs>
<TabItem value="code">
Expand All @@ -133,7 +133,7 @@ model = cnn.ResBlock(
residual=True,
)
```

</TabItem>
<TabItem value="model structure">

Expand All @@ -155,7 +155,7 @@ ResBlock(
```

</TabItem>
</Tabs>
</Tabs>

A 3x3 `ResBlock` with a max-pooling-residual, 2 times down-sample

Expand All @@ -176,7 +176,7 @@ model = cnn.ResBlock(
:::caution
If you want a pooling operation as a residual path, you need to have your `outplanes` equal to `inplanes`.
:::

</TabItem>
<TabItem value="model structure">

Expand All @@ -192,4 +192,4 @@ ResBlock(
```

</TabItem>
</Tabs>
</Tabs>
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Do more things, write less codes.
## If you want (Click to go):

- [x] [Model profiler helper](./profiler)
- [ ] [Basic CNN code snippets](./cnn-snippets)
- [ ] [Basic CNN code snippets](./cnn-snippets)
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ profile(model, input_shape=(1, 64, 1280, 720), speedtest=100)

## Specify the input / input shape

You can either give an `input_shape` or specify an `specific_input`. The priority of `specific_input` is higher. If your model takes an ordinary `torch.Tensor` as input, you can both specify the `input_shape` or the `specific_input`.
You can either give an `input_shape` or specify an `specific_input`. The priority of `specific_input` is higher. If your model takes an ordinary `torch.Tensor` as input, you can both specify the `input_shape` or the `specific_input`.

For example:
```python
Expand Down Expand Up @@ -139,4 +139,4 @@ If your code looks like:
model.cuda()
profile(model, input_shape=(1, 64, 1280, 720), speedtest=10, profiling=False)
```
Then `profile` only inferences the model 100 times for speed test with the input of a `(1, 64, 1280, 720)` shaped Tensor.
Then `profile` only inferences the model 100 times for speed test with the input of a `(1, 64, 1280, 720)` shaped Tensor.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
sidebar_position: 8
---

# NEETBOX.utils
# NEETBOX.utils
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion doc/static/img/logo.svg → docs/static/img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes.
File renamed without changes.

0 comments on commit 502fa1f

Please sign in to comment.