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

Update local_context.py/ssh_context.py #370

Merged
merged 23 commits into from
Oct 10, 2023
Merged

Conversation

ZhouXY-PKU
Copy link
Contributor

@ZhouXY-PKU ZhouXY-PKU commented Oct 8, 2023

To support wildcards for backward_files and backward_common_files.
Now only support for local_context and ssh_context.
#371

ZhouXY-PKU and others added 2 commits October 8, 2023 15:18
To support wildcards for backward*files
Modify error file download.
dpdispatcher/local_context.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (f984891) 57.43% compared to head (a0f2b6f) 57.38%.

❗ Current head a0f2b6f differs from pull request most recent head e71f0dd. Consider uploading reports for the commit e71f0dd to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #370      +/-   ##
==========================================
- Coverage   57.43%   57.38%   -0.06%     
==========================================
  Files          31       31              
  Lines        3409     3466      +57     
==========================================
+ Hits         1958     1989      +31     
- Misses       1451     1477      +26     
Files Coverage Δ
dpdispatcher/local_context.py 77.53% <58.82%> (-5.72%) ⬇️
dpdispatcher/ssh_context.py 80.17% <61.53%> (-0.63%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ZhouXY-PKU ZhouXY-PKU changed the title Update local_context.py Update local_context.py/ssh_context.py Oct 9, 2023
dpdispatcher/ssh_context.py Outdated Show resolved Hide resolved
ZhouXY-PKU and others added 3 commits October 10, 2023 11:50
Fix error of using glob for remote root.
To deal with error of the unit tests.
@@ -647,30 +648,45 @@ def download(
file_list = []
# for ii in job_dirs :
for task in submission.belonging_tasks:
try:
remote_file_list = self.sftp.listdir(
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 listdir only lists files under the root directory, doesn't it? If the file is aa/bb, remote_file_list only contains aa and cannot find aa/bb.

Copy link
Member

Choose a reason for hiding this comment

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

Also, i/o operation in the remote server might be expensive, so I suggest only doing that when necessary (i.e. * is in the filenames).

Copy link
Contributor Author

@ZhouXY-PKU ZhouXY-PKU Oct 10, 2023

Choose a reason for hiding this comment

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

Sorry, it truly ignores aa/bb , and it has been fixed now.
And thanks for your suggestions, listdir now only do when wildcards are in the filenames.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Bohrium HDFS OpenAPI Context remain to be modified)

@njzjz njzjz linked an issue Oct 10, 2023 that may be closed by this pull request
ZhouXY-PKU and others added 6 commits October 10, 2023 16:58
Search for files in dirs of task_work_path.
Listdir only when wildcards appear.
Try to solve pyright problem of unit test: type checker
Try to pass unit test of TypeChecker again
@njzjz
Copy link
Member

njzjz commented Oct 10, 2023

I am going to add some tests to confirm the code is correct.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz merged commit 7d89246 into deepmodeling:master Oct 10, 2023
25 checks passed
njzjz added a commit to njzjz/dpdispatcher that referenced this pull request Oct 19, 2023
Fix regression caused by deepmodeling#370.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
njzjz added a commit that referenced this pull request Oct 19, 2023
Fix regression caused by #370.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.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.

Wild-cards support for backward_files and backward_common_files
2 participants