Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Niftireader #1151

Merged
merged 15 commits into from Apr 2, 2021
Merged

Niftireader #1151

merged 15 commits into from Apr 2, 2021

Conversation

ssktotoro
Copy link
Contributor

@ssktotoro ssktotoro commented Mar 31, 2021

Before submitting (checklist)

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contribution guide?
  • Did you check the code style? catalyst-make-codestyle && catalyst-check-codestyle (pip install -U catalyst-codestyle).
  • Did you make sure to update the docs? We use Google format for all the methods and classes.
  • Did you check the docs with make check-docs?
  • Did you write any new necessary tests?
  • Did you check that your code passes the unit tests pytest . ?
  • Did you add your new functionality to the docs?
  • Did you update the CHANGELOG? No I need to make the PR to link first
  • Did you run colab minimal CI/CD with latest and minimal requirements?

Description

Related Issue

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

PS

  • I know, that I could join slack for pull request discussion.

@Scitator
Copy link
Member

Thanks for the PR! Could you please also:

PS. would you like to contribute any extra test for NiftyReader for the community?

@ssktotoro
Copy link
Contributor Author

is there a test for existing readers like the cv reader?

@Scitator
Copy link
Member

Not sure if :)
(our main contrib issue)

But you could use our utils or data test for inspiration.

@ssktotoro
Copy link
Contributor Author

@Scitator not really sure how to fix the cache-pip issue >.<
I don't know how the .github/workflows/codestyle.yml works

@@ -0,0 +1,39 @@
from typing import Optional

import nibabel as nib
Copy link
Member

@Scitator Scitator Apr 1, 2021

Choose a reason for hiding this comment

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

Suggested change
import nibabel as nib
from catalyst.settings import SETTINGS
if SETTINGS.nifti_required:
import nibabel as nib

by this way, we could build the documentation even without the nibabel package :)

@Scitator
Copy link
Member

Scitator commented Apr 1, 2021

Looks like you have change the reviewdog workflow. Nevertheless, we also need to add requirements update: cache and installation to the codestyle-and-docs one. That's the case :)

uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip -${{ hashFiles('./requirements/requirements-cv.txt') }} -${{ hashFiles('./requirements/requirements-hydra.txt') }} -${{ hashFiles('./requirements/requirements-ml.txt') }} -${{ hashFiles('./requirements/requirements-nifti.txt') }} -${{ hashFiles('./requirements/requirements-optuna.txt') }} -${{ hashFiles('./requirements/requirements-mlflow.txt') }}
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to change the key in case of several caches

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can you point me to either what consumes codestyle.yml so I know what is valid/ good for the yml?

Or you can suggest directly what I'm supposed to change. I don't know what consumes the yml and what the key even means and therefore don't know what to change the key to...

Copy link
Member

Choose a reason for hiding this comment

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

honestly speaking, I suggest just return the initial case with united pip cache
I need an extra time to check GitHub CI docs, so we could update the cache logic later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that... just fyi the test will fail b/c the key in the initial case is too long.

Copy link
Member

Choose a reason for hiding this comment

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

oh

.github/workflows/codestyle.yml Outdated Show resolved Hide resolved
Copy link
Member

@Scitator Scitator left a comment

Choose a reason for hiding this comment

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

could we do so?

.github/workflows/codestyle.yml Outdated Show resolved Hide resolved
.github/workflows/codestyle.yml Outdated Show resolved Hide resolved
@mergify mergify bot dismissed Scitator’s stale review April 1, 2021 18:30

Pull request has been modified.

@ssktotoro
Copy link
Contributor Author

The test makes CI fail as the requirements for contrib are presumably not installed. Not sure what to do about it.

Copy link
Member

@Scitator Scitator left a comment

Choose a reason for hiding this comment

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

could that help?

uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-contrib -${{ hashFiles('./requirements/requirements-cv.txt') }} -${{ hashFiles('./requirements/requirements-hydra.txt') }} -${{ hashFiles('./requirements/requirements-ml.txt') }} -${{ hashFiles('./requirements/requirements-nifti.txt') }} -${{ hashFiles('./requirements/requirements-optuna.txt') }} -${{ hashFiles('./requirements/requirements-mlflow.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
${{ runner.os }}-${{ matrix.python-version }}-pip-
${{ runner.os }}-${{ matrix.python-version }}-pip-contrib

.github/workflows/codestyle.yml Outdated Show resolved Hide resolved
@ssktotoro
Copy link
Contributor Author

don't know why catalyst / dl-cpu (ubuntu-20.04, 3.7, minimal) (pull_request) fails, but it should be good?

@Scitator Scitator merged commit 0722b1a into catalyst-team:master Apr 2, 2021
@Scitator
Copy link
Member

Scitator commented Apr 2, 2021

that should be okay – Github CI freezes sometimes

zkid18 pushed a commit to zkid18/catalyst that referenced this pull request Apr 4, 2021
* changes for NiftiReader

* adding import statement that was needed and fixing codestyle

* updated CHANGELOG

* removing unnecesary documentation

* fixing codestyle

* updated docs and requirements

* adding a space

* not importing nibabel for docs

* fixing typo

* adding step for contrib pip caching

* fixed codestyle and added a test for reader that uncovered a mistake :)

* hopefully fixing imports

* adding sergey suggested fix

* fixing deploy_push.yml

* updating workflows

Co-authored-by: Kevin Wang <kevin.wang@affectiva.com>
Co-authored-by: Kevin Wang <kcwang26@gsu.edu>
Scitator added a commit that referenced this pull request Apr 9, 2021
* add movielens

* First hitrate metric version

* metrge with upstream

* fix topk_map

* fix error in map

* tests for map

* top_k ndcg

* edit changelog

* edit the tabs

* check codestyle

* check the intent

* check the intent

* remove trailing whitespace

* fixed hitrate

* fixed the docs

* hitrate

* Additive margin softmax (#1131)

* Added Additive-margin softmax

* update changelog.md

* Readme update2 (#1142)

* readme

* batch overfit fix for reproducibility

* batch overfit fix for reproducibility

* readme

* readme update

* extra Config/Hydra API fixes

* codestyle

* updated dl_cpu(workflows)- For passing CI-Tests (#1135)

* updated dl_cpu

* Updated-requirements-ml.txt

* corrected the mistake

* Update dl_cpu.yml

* Update requirements-ml.txt

* Kept dl_cpu 20.04-3.6 minimal as requested

* Corrected the mistakes

* Add requirements parameter

* Update dl_cpu.yml

* Update dl_cpu.yml

Co-authored-by: Sergey Kolesnikov <scitator@gmail.com>

* fix: `_key_value` for schedulers in case of multiple optimizers fixed (#1146)

* Github CI fixes (#1143)

* verbose

* Utils callbacks (#1127)

* quantization.py

* onnx and quantization

* tracing.py

* docs

* fix

* fix

* quantization test

* fix test

* fix comments

* fix comments

* Update catalyst/callbacks/__init__.py

Co-authored-by: Sergey Kolesnikov <scitator@gmail.com>

* tests

* tests

* tests

* tests

* tests

* pycharm tricks

* extra tests

* Utils callbacks (#1145)

* quantization.py

* onnx and quantization

* tracing.py

* docs

* fix

* fix

* quantization test

* fix test

* fix comments

* fix comments

* quantization example

* examples

* CHANGELOG.md

* fix

* fix

* Apply suggestions from code review

Co-authored-by: Sergey Kolesnikov <scitator@gmail.com>

* extra tests 2

* extra tests 2

* extra tests 2

* extra tests 2

* extra tests 2

* extra tests 2

* extra tests 2

* extra tests 2

Co-authored-by: Nikita Balagansky <37884009+elephantmipt@users.noreply.github.com>

* Engine docs (#1141)

* typings & few docs

* typing fix; disabled `dist.barrier()` in optimizer step for ddp

* docs

* docs: fixed long lines with docs

* docs fixes

* optimizer args

* removed empty line

Co-authored-by: Dmytro Doroshenko <dimdoroshenko@gmail.com>

* v21.03.1

* v21.03: minimal version fix (#1147)

* minimal version fix

* docs

* fix: nested dicts in loaders_params/samplers_params overriding (#1150)

* docs (#1152)

* Github CI fix (#1148)

* fix

* fix

* Niftireader (#1151)

* changes for NiftiReader

* adding import statement that was needed and fixing codestyle

* updated CHANGELOG

* removing unnecesary documentation

* fixing codestyle

* updated docs and requirements

* adding a space

* not importing nibabel for docs

* fixing typo

* adding step for contrib pip caching

* fixed codestyle and added a test for reader that uncovered a mistake :)

* hopefully fixing imports

* adding sergey suggested fix

* fixing deploy_push.yml

* updating workflows

Co-authored-by: Kevin Wang <kevin.wang@affectiva.com>
Co-authored-by: Kevin Wang <kcwang26@gsu.edu>

* add changelog

* solved runtime error

* hitrate calculation

Co-authored-by: Daniel Chepenko <dchepenk@yahoo-corp.co>
Co-authored-by: denyhoof <kde97@yandex.ru>
Co-authored-by: Даниил <zkid18@MacBook-Pro.Dlink>
Co-authored-by: Atharva Phatak <athp456@gmail.com>
Co-authored-by: Sergey Kolesnikov <scitator@gmail.com>
Co-authored-by: Yauheni Kachan <19803638+bagxi@users.noreply.github.com>
Co-authored-by: Nikita Balagansky <37884009+elephantmipt@users.noreply.github.com>
Co-authored-by: Dmytro Doroshenko <dimdoroshenko@gmail.com>
Co-authored-by: Kevin Wang <kcwang@ymail.com>
Co-authored-by: Kevin Wang <kevin.wang@affectiva.com>
Co-authored-by: Kevin Wang <kcwang26@gsu.edu>
zkid18 pushed a commit to zkid18/catalyst that referenced this pull request Jul 4, 2021
* changes for NiftiReader

* adding import statement that was needed and fixing codestyle

* updated CHANGELOG

* removing unnecesary documentation

* fixing codestyle

* updated docs and requirements

* adding a space

* not importing nibabel for docs

* fixing typo

* adding step for contrib pip caching

* fixed codestyle and added a test for reader that uncovered a mistake :)

* hopefully fixing imports

* adding sergey suggested fix

* fixing deploy_push.yml

* updating workflows

Co-authored-by: Kevin Wang <kevin.wang@affectiva.com>
Co-authored-by: Kevin Wang <kcwang26@gsu.edu>
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.

None yet

2 participants