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

Add STIMULUS/CHECKTORCHMODEL #6898

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

itrujnara
Copy link
Contributor

@itrujnara itrujnara commented Oct 29, 2024

Closes #6872
Closes nf-core/deepmodeloptim#197

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda

@itrujnara
Copy link
Contributor Author

The nf-test fails because the current version of the Python script expects a JSON and the test data is YAML. It will be fixed soon.

Copy link
Contributor

@vagkaratzas vagkaratzas left a comment

Choose a reason for hiding this comment

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

Some comments here and there. Not sure about the container, if it can be in nf-core modules with just that. Is there a similar module?

container "docker.io/mathysgrapotte/stimulus-py:0.2.4.dev"

input:
path(data)
Copy link
Contributor

Choose a reason for hiding this comment

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

no meta? :(

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've found a way to put it back in, it might be useful

modules/nf-core/stimulus/checktorchmodel/main.nf Outdated Show resolved Hide resolved
# initialize Ray
ray start --head --port=6379 --temp-dir /tmp/ray

# wait or it to start
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# wait or it to start
# wait for it to start

@itrujnara
Copy link
Contributor Author

I've addressed the comments. I'm still working on the Conda tests.

Copy link
Contributor

@vagkaratzas vagkaratzas left a comment

Choose a reason for hiding this comment

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

Almost there. Some more comments, and to find out why the test are failing!

Comment on lines 9 to 10
tuple val(meta), path(data), path(data_config)
tuple val(meta), path(model), path(model_config), path(initial_weights)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
tuple val(meta), path(data), path(data_config)
tuple val(meta), path(model), path(model_config), path(initial_weights)
tuple val(meta) , path(data), path(data_config)
tuple val(meta2), path(model), path(model_config), path(initial_weights)

@@ -0,0 +1,60 @@
process STIMULUS_CHECKTORCHMODEL {
tag "$data_config - $data"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just:
tag "$meta.id"


script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: model.baseName.replaceFirst(/\.py/, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a suggestion here. Instead of trying to parse the model's file name, shouldn't we just use the meta.id as in every other module? You can feed the module the python filename as a meta then, when calling the module.

pattern: "*.{yml,yaml}"
ontologies:
- edam: "http://edamontology.org/format_3464"
- - meta:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- - meta:
- - meta2:

@itrujnara
Copy link
Contributor Author

I've addressed the second review comments. We're aware of failing conda tests and linting and we're working to get the package to conda-forge to fix the problems. If there are any more issues, we'll address them afterwards.

Copy link
Contributor

@vagkaratzas vagkaratzas left a comment

Choose a reason for hiding this comment

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

Good!

Copy link
Contributor

@vagkaratzas vagkaratzas left a comment

Choose a reason for hiding this comment

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

I'll be on standby to do a final check after the conda env is fixed.

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.

new module: STIMULUS/CHECKTORCHMODEL Turn check_torch_model into an nf-core module
3 participants