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

txt file open load #280

Open
Ella77 opened this issue Feb 8, 2019 · 1 comment
Open

txt file open load #280

Ella77 opened this issue Feb 8, 2019 · 1 comment

Comments

@Ella77
Copy link

Ella77 commented Feb 8, 2019

기타

txt파일을 쓰는 sampler라는 함수가 있을때
def sampler(directory_path, output_path):
...
f = open(output_path,'w')
f.write("".join(triplets))

f.close()
print("done")

BASE_PATH = DATASET_PATH+'/train/train_data'

nsml.cache(triplet_sampler, directory_path= BASE_PATH, output_path="./output.txt")  로 저장됨을 확인하였습니다. 

다른 세션에서 이 file을 사용하고 싶은데요.
다른 세션의 main함수에서
nsml.cache(triplet_sampler, directory_path= BASE_PATH, output_path="./output.txt")
f = open(./output.txt)
f_read = f.read()

FileNotFoundError: [Errno 2] No such file or directory: './output.txt'

현재 app폴더에 txt를 추가해서 같이 올리는 것은 txt사이즈가 50mb가 넘어서 불가능합니다.

@nsml-admin
Copy link
Collaborator

올려주신 코드만봤을때는 사용법에 문제가없어보이는데요,

해당에러가발생하는 코드를 봐야 할 것 같습니다.

세션네임을 알려주시면 확인해보겠습니다.

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

No branches or pull requests

2 participants