-
Notifications
You must be signed in to change notification settings - Fork 4
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
Pipeline Architecture Refinement and Enhancement #3
Conversation
element_moseq/moseq_infer.py
Outdated
"pose_estimation_method", | ||
) | ||
|
||
kpms_root_inbox, kpms_root_outbox = get_kpms_root_data_dir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no guarantee that get_kpms_root_data_dir()
will return 2 directories. And there is no notion of inbox
or outbox
in the elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will modify this by using root
and processed
instead, as follows:
kpms_root = moseq_infer.get_kpms_root_data_dir()
kpms_processed = moseq_infer.get_kpms_processed_data_dir()
element_moseq/moseq_infer.py
Outdated
kpms_root_inbox, kpms_root_outbox = get_kpms_root_data_dir() | ||
model_dir = find_full_path( | ||
kpms_root_outbox, | ||
(Model & "model_id = {}".format(model_id)).fetch1("model_dir"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like there may be a bug in this line, also, I'd suggest using f-string formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified this piece of code as follows:
kpms_root = get_kpms_root_data_dir()
kpms_processed = get_kpms_processed_data_dir()
model_dir = find_full_path(
kpms_processed,
(Model & f"model_id = {model_id}").fetch1("model_dir"),
)
There are no errors triggered when running the tutorial locally.
element_moseq/moseq_train.py
Outdated
fit_model, | ||
) | ||
|
||
_, kpms_root_outbox = moseq_infer.get_kpms_root_data_dir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no guarantee that kpsm_root_outbox
will be the 2nd element returned from the get_kpms_root_data_dir()
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. I've made the following alteration:
kpms_processed = moseq_infer.get_kpms_processed_data_dir()
kpms_project_output_dir = find_full_path(
kpms_processed, (PCATask & key).fetch1("kpms_project_output_dir")
)
Thank you @MilagrosMarin, I left a few suggestions for improvement but overall this is ready to merge as the initial release |
Thanks, @ttngu207 . Your feedback is greatly appreciated. I've implemented the suggested changes, and the code is now ready for merging. Please review. Thank you! |
This PR incorporates feedback from previous PR#2 reviewers and implements modifications to the pipeline architecture.
Changes in pipeline:
Schema and table renaming:
kpms_pca
tomoseq_train
kpms_model
tomoseq_infer
LoadKeypointSet
toPCAPrep
PrefittingTask
toPreFitTask
PreFitting
toPreFit
FullFittingTask
toFullFit
FullFitting
toFullFit
PCAFitting
toPCAFit
Moved tables between schemas:
PreFit
andFullFit
frommoseq_infer
tomoseq_train
Additional attributes and data type modifications:
frame_rate
,model_desc
,etc) and renamed some of them according to the previous pipeline modification ('pre_fit_duration,
pre_fit_desc`, etc).inference_duration
,pre_fit_duration
, andfull_fit_duration
fromtime
tofloat
and removed time formatting codeCode refactoring and reorganization:
make
function ofInference
andPCAPrep
tablesUpdates according to main changes:
citation.md
,index.md
,partnerships.md
,pipeline.md
tutorial.ipynb
Other major changes:
tutorial_pipeline.ipynb
Dockerfile
environment variableskpms_project_output_dir
folder in the s3 bucket for tutorial purposesOther minor changes:
release.yml
outbox
files from the public S3 bucket and integratingload
functions for these files into the pipeline code. This is necessary because Codespaces does not provide write access to the public S3 bucket. We plan to implement this in the upcoming Pull Request.