Skip to content

Commit

Permalink
Format Python code with psf/black push (#195)
Browse files Browse the repository at this point in the history
There appear to be some python formatting errors in
e3c152d. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix
these issues.
  • Loading branch information
rhoadesScholar committed Mar 19, 2024
2 parents d6705fb + 8cae470 commit 66ba704
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions dacapo/examples/distance_task/cosem_example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# %% [markdown]
# # Dacapo
#
# DaCapo is a framework that allows for easy configuration and execution of established machine learning techniques on arbitrarily large volumes of multi-dimensional images.
#
# DaCapo has 4 major configurable components:
# 1. **dacapo.datasplits.DataSplit**
#
# 2. **dacapo.tasks.Task**
#
# 3. **dacapo.architectures.Architecture**
#
# 4. **dacapo.trainers.Trainer**
#
# These are then combined in a single **dacapo.experiments.Run** that includes your starting point (whether you want to start training from scratch or continue off of a previously trained model) and stopping criterion (the number of iterations you want to train).

# %% [markdown]
# ## Environment setup
# If you have not already done so, you will need to install DaCapo. You can do this by first creating a new environment and then installing DaCapo using pip.
#
# ```bash
# conda create -n dacapo python=3.10
# conda activate dacapo
# ```
#
# Then, you can install DaCapo using pip, via GitHub:
#
# ```bash
# pip install git+https://github.com/janelia-cellmap/dacapo.git
# ```
#
# Or you can clone the repository and install it locally:
#
# ```bash
# git clone https://github.com/janelia-cellmap/dacapo.git
# cd dacapo
# pip install -e .
# ```
#
# Be sure to select this environment in your Jupyter notebook or JupyterLab.

# %% [markdown]
"""
## Config Store
To define where the data goes, create a dacapo.yaml configuration file either in `~/.config/dacapo/dacapo.yaml` or in `./dacapo.yaml`. Here is a template:
```yaml
type: files
runs_base_dir: /path/to/my/data/storage
```
The `runs_base_dir` defines where your on-disk data will be stored. The `type` setting determines the database backend. The default is `files`, which stores the data in a file tree on disk. Alternatively, you can use `mongodb` to store the data in a MongoDB database. To use MongoDB, you will need to provide a `mongodbhost` and `mongodbname` in the configuration file:
```yaml
...
mongodbhost: mongodb://dbuser:dbpass@dburl:dbport/
mongodbname: dacapo
"""

# %%
# First we need to create a config store to store our configurations
from dacapo.store.create_store import create_config_store
Expand Down

0 comments on commit 66ba704

Please sign in to comment.