Skip to content

Conversation

@diegoluna3
Copy link

Updated boss_access.py and associated Dockerfile and README. The older boss_access.py is still available under boss_access_legacy.py

@diegoluna3 diegoluna3 self-assigned this Feb 16, 2021
Copy link
Contributor

@erikjohnson24 erikjohnson24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intern and numpy versions should be pinned before closing. If possible, the xyz vs zyx order argument (optional, default = "xyz") for the output and input should be implemented, but could be skipped and just noted in the documentation.

FROM python:3.6

# Install any needed packages specified in requirements.txt
RUN pip install numpy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we pin version?

RUN pip install scipy boto3

# RUN git clone https://github.com/jhuapl-boss/intern.git && cd intern && git checkout RemoteExtension && git pull && python3 setup.py install --user
RUN pip install intern
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we pin version?

)

# Change to X,Y,Z for pipeline
cutout_data = np.transpose(cutout_data, (2, 1, 0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to make this a arg for the tool? data_order="xyz" or "zyx" with "xyz" as default? This has come up several time as a bug and we have to write transpose steps into other tools!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would only be for boss_pull_cutout right? when a user pushes data back to bossdb should we assume that their data is already in xyz order?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data in bossdb are stored in ZYX order

```
boss_access.py push (-c CONFIG | -t TOKEN) [-b BUCKET] --coll COLL --exp EXP --chan CHAN --coord COORD --dtype DTYPE --itype ITYPE [--res RES] [--xmin XMIN][--xmax XMAX] [--ymin YMIN] [--ymax YMAX] [--zmin ZMIN] [--zmax ZMAX] [--padding PADDING] -o OUTPUT [--s3-only]
```bash
boss_access.py push (-c CONFIG | -t TOKEN) --coll COLL --exp EXP --chan CHAN [--res RES] [--xmin XMIN][--xmax XMAX] [--ymin YMIN] [--ymax YMAX] [--zmin ZMIN] [--zmax ZMAX] --type TYPE -i INPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add documentation that says what bossdb stack it defaults to. I'm assuming if you provide a token it defaults to 'api.bossdb.io' but maybe if you want to use 'api.theboss.io' you have to provide a config file with the host/protocol you want.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unfamiliar with api.theboss.io, is there also a public token for that host?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah so thats the MICrONS stack so basically there are a couple different "bosses" out there. There is the public stack (api.bossdb.io), microns stack (api.theboss.io), test stack (api.bossdbtest.io), and personal dev stacks (api-xenesd1.thebossdev.io). All of them have separate data, user accounts, settings, etc. So to use this tool for another stack there should be two additional inputs:

protocol (optional, str): defaults to 'https'
host (optional, str): defaults to 'api.bossdb.io'

That way for regular use-cases I dont have to worry about remembering the public boss api domain but still have the option to use another stack if needed.

COLL_NAME,
EXP_NAME,
type=intern_chans._channel.type,
datatype=intern_chans.dtype
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have we tested this code with creating a new channel? I think the array function creates a new channel when it doesnt exist so it might not need the secondary logic

EXP_NAME = args.exp
CHAN_NAME = args.chan

if args.type == 'image':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better if instead we just let user specify dtype explicitly, because that would allow option for uint16 data OR we can just get is straight from the numpy array. So if dtype is specified we use that but if its not specified we just default to input_array.dtype

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes! we know that uint8 or uint16 is image and uint64 is annotation, so we don't need the user to specify image type. Are there any other image types besides 'image' or 'annotation'?

Copy link
Contributor

@dxenes1 dxenes1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes for some of the input arguments and I think it's set!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants