当前文件夹:
- t.ipython
- test.py
test.py
:
print("Hello, SageMaker studio lab!")
在Jupyter Lab中运行.py文件有两种方法
1. 将文件导入ipython的cell中
示例代码:
%load test.py
运行结果:
2. 直接运行.py文件
示例代码:
%run test.py
运行结果:
test.py
:
print("Hello, SageMaker studio lab!")
示例代码:
%load test.py
运行结果:
示例代码:
%run test.py
运行结果:
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。