Skip to content

Commit

Permalink
Merge pull request #119 from hekaisheng/upgrade-0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuye (Chris) Qin authored May 7, 2020
2 parents 9dbf6c2 + 2e3c692 commit 4992c4d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
14 changes: 12 additions & 2 deletions docs/source/mars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Mars 使用指南

.. code:: shell
pip install pymars==0.4.0rc1 # install mars
pip install pyarrow==0.11.1
pip install pymars==0.4.0rc1 # install mars
Mars 集群控制
Expand All @@ -26,6 +27,7 @@ PyODPS 提供了Mars的使用接口,用户拉起集群后,就可以使用Mar

.. code:: python
>>> options.verbose=True # 通过设置自动打印 logview 以及 Mars endpoint
>>> client = o.create_mars_cluster(5, 4, 16, min_worker_num=3)
Expand All @@ -52,7 +54,15 @@ PyODPS 提供了Mars的使用接口,用户拉起集群后,就可以使用Mar
>>> print(client.get_logview_address())
也可以通过设置``options.verbose``为 True,可以自动打印Logview等信息。
获取 Instance id
-----------------

可以获取当前实例的 instance id。

.. code:: python
>>> print(client.instance_id)
释放集群
Expand Down
2 changes: 1 addition & 1 deletion odps/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version_info = (0, 9, 0, 1)
version_info = (0, 9, 1)
_num_index = max(idx if isinstance(v, int) else 0
for idx, v in enumerate(version_info))
__version__ = '.'.join(map(str, version_info[:_num_index + 1])) + \
Expand Down
8 changes: 6 additions & 2 deletions odps/mars_extension/deploy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ def notebook_endpoint(self):
def session(self):
return self._mars_session

@property
def instance_id(self):
return self._kube_instance.id

def submit(self, worker_num=1, worker_cpu=8, worker_mem=32, disk_num=1, min_worker_num=None, cache_mem=None,
resources=None, module_path=None, create_session=True, priority=None, running_cluster=None,
scheduler_num=1, **kw):
Expand All @@ -99,8 +103,8 @@ def submit(self, worker_num=1, worker_cpu=8, worker_mem=32, disk_num=1, min_work
'worker_mem': worker_mem,
'cache_mem': cache_mem or '',
'disk_num': disk_num,
'resources': resources or ['public.mars-0.4.0b2.zip',
'public.pyodps-0.8.5.zip'],
'resources': resources or ['public.mars-0.4.0rc1.zip',
'public.pyodps-0.9.1.zip'],
'module_path': module_path or ['odps.mars_extension'],
}
if kw.get('mars_app_image', None) is not None:
Expand Down

0 comments on commit 4992c4d

Please sign in to comment.