Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,20 @@ pip install abismal[cuda]

You can now use abismal with GPU acceleration by running `conda activate abismal`.
You can test GPU support by typing `abismal --list-devices`.

# Running tests
Abismal CI runs tests on each pull request. Development installs are similar to a normal install, but it is important
to make sure that you install `abismal[dev]` in a fresh environment.
Running the following commands will set up an environment.
```
git clone https://github.com/rs-station/abismal.git
cd abismal
conda create -yn abismal -c conda-forge dials python=3.12
conda activate abismal
pip install -e .[dev]
```

Tests are run by calling `pytest` in the root of the abismal source code directory.



7 changes: 4 additions & 3 deletions abismal/command_line/abismal.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ def main(args=None):

logger.info("Compiling model")
model.compile(opt, run_eagerly=parser.run_eagerly, jit_compile=parser.jit_compile)
if parser.debug:
if parser.embed:
logger.info("Embed selected, entering interactive, IPython shell.")
from IPython import embed
embed(colors='linux')

Expand Down Expand Up @@ -341,8 +342,8 @@ def main(args=None):

logger.info("Finished training.")

if parser.debug:
logger.info("Debug mode selected, entering interactive, IPython shell.")
if parser.embed:
logger.info("Embed selected, entering interactive, IPython shell.")
from IPython import embed

embed(colors="linux")
Expand Down
11 changes: 11 additions & 0 deletions abismal/command_line/parser/tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,17 @@ def __call__(self, *args, **kwargs):
}
),


(
(
"--embed",
),{
"help": "Embed into an IPython shell just before and just after the model is trained. Helpful for debugging.",
"action" : "store_true",
}
),


(
(
"--list-devices",
Expand Down
2 changes: 1 addition & 1 deletion tests/command_line/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"--shuffle-buffer-size=10",
"--steps-per-epoch=10",
"--num-cpus=1",
#"--debug",
"--debug",
)

def run_abismal(flags, files, additional_asserts=()):
Expand Down
Loading