Supporting TECA_assets svn repo in TECA - #351
Conversation
|
it's looking good so far. We need to add a cmake target to fetch assets during build. So for instance one could say "make TECA_assets" and this would trigger a See also: |
d6b1d4f to
e0657f5
Compare
|
@burlen I set |
e0657f5 to
ae8e18f
Compare
burlen
left a comment
There was a problem hiding this comment.
Looks good (but please notice that I flagged minor tweak in the code comments). Also I don't see the cmake code to fetch the repo. This would be needed for deployment on PyPi. Comments above have links to the relevant cmake functions. I'd like to see this incorporated.
0b2a677 to
ca41579
Compare
ca41579 to
27ac12d
Compare
burlen
left a comment
There was a problem hiding this comment.
Hi Abdel, solid progress was made, but I flagged a few issues. In addition to comments in the code, also need to install the assets by make install.
| CONFIGURE_COMMAND "" BUILD_COMMAND "" | ||
| INSTALL_COMMAND "" LOG_DOWNLOAD 1) | ||
| ExternalProject_Get_property(TECA_assets SOURCE_DIR) | ||
| set(TECA_ASSETS_ROOT ${SOURCE_DIR}) |
There was a problem hiding this comment.
I believe that this will make a new variable and will not update the cached variable of the same name declared above. The cmake docs confirm this. This code should be restructured so the second variable is not needed. https://cmake.org/cmake/help/v3.18/manual/cmake-language.7.html#cmake-language-variables
| echo "usage: test_deeplabv3p_ar_detect_app.sh [app prefix] " \ | ||
| "[data root] [mpi exec] [test cores]" | ||
| echo "usage: test_deeplabv3p_ar_detect_app.sh [app prefix] " \ | ||
| "[data root] [assets root] [mpi exec] [test cores]" |
There was a problem hiding this comment.
we should no longer have to pass this on the command line , use the functions you added in teca_py_config.i
There was a problem hiding this comment.
I applied this change only to the test_deeplabv3p_ar_detect.py test in 8a8bdb. However I didn't do this to the app because the user is expected to pass the deeplab model path to the command line --pytorch_deeplab_model. That's why [assets root] is being passed to this bash file
There was a problem hiding this comment.
You need to update the command line application. You could leave the command line option, so that one could pass the model there. The default should be that the model is taken from the assets directory. Having the model available internally(in the install) is the point of deploying the assets with TECA and the app should make use of it.
|
|
||
| mpiexec -np 10 ./bin/teca_tc_trajectory_scalars \ | ||
| --texture ../../TECA_data/earthmap4k.png \ | ||
| --texture ../../TECA_assets/earthmap4k.png \ |
There was a problem hiding this comment.
we no longer need to pass on the command line, the default value can be obtained using the new api you defined in teca_py_config.i
There was a problem hiding this comment.
I don't think we should do that because this is given as a command line argument to the --texture option in the teca_tc_trajectory_scalars app. We can modify it to /path/to/background_image.png if that makes sense. Please let me know if I am missing something.
There was a problem hiding this comment.
You might be missing that the point of deploying the assets with TECA is that we no longer need to pass these on the command line. It's fine to leave the command line options but make them optional, with the default value pointing to the assets location. Same deal as with the pytorch model.
| SVN_REPOSITORY svn://svn.code.sf.net/p/teca/TECA_data | ||
| UPDATE_COMMAND svn update | ||
| CONFIGURE_COMMAND "" BUILD_COMMAND "" | ||
| INSTALL_COMMAND "" LOG_DOWNLOAD 1) |
There was a problem hiding this comment.
how verbose is this? is it disruptive to display in the terminal? if it is not too bad doing so may help a user understand what's going on. I'll leave that call up to you.
There was a problem hiding this comment.
Yes it is a little disruptive especially to the progress percentage-values that we get at the building process.
| \begin{minted}{bash} | ||
| mpiexec -np 10 ./bin/teca_tc_trajectory_scalars \ | ||
| --texture ../../TECA_data/earthmap4k.png \ | ||
| --texture ../../TECA_assets/earthmap4k.png \ |
There was a problem hiding this comment.
use the new api in teca_py_config.i to fetch a default internally
There was a problem hiding this comment.
I don't think we should do that because this is given as a command line argument to the --texture option in the teca_tc_trajectory_scalars app. We can modify it to /path/to/background_image.png if that makes sense. Please let me know if I am missing something.
| CONFIGURE_COMMAND "" BUILD_COMMAND "" | ||
| INSTALL_COMMAND "" LOG_DOWNLOAD 1) | ||
| ExternalProject_Get_property(TECA_data SOURCE_DIR) | ||
| set(TECA_DATA_ROOT ${SOURCE_DIR}) |
There was a problem hiding this comment.
restructure this as explained in section re: assets below
8a8bdb2 to
29a5bd9
Compare
29a5bd9 to
0d1cb67
Compare
Moved deeplab models + png/jpg files to TECA_assets
Resolves #477