In a world where compute is paramount, it is all too easy to overlook the importance of storage and IO in the performance and optimization of Spark jobs.
In a world where compute is paramount, it is all too easy to overlook the importance of storage and IO in the performance and optimization of Spark jobs.
Accelerating query processing with materialized views in Apache HiveDataWorks Summit
Over the last few years, the Apache Hive community has been working on advancements to enable a full new range of use cases for the project, moving from its batch processing roots towards a SQL interactive query answering platform. Traditionally, one of the most powerful techniques used to accelerate query processing in data warehouses is the precomputation of relevant summaries or materialized views.
This talk presents our work on introducing materialized views and automatic query rewriting based on those materializations in Apache Hive. In particular, materialized views can be stored natively in Hive or in other systems such as Druid using custom storage handlers, and they can seamlessly exploit new exciting Hive features such as LLAP acceleration. Then the optimizer relies in Apache Calcite to automatically produce full and partial rewritings for a large set of query expressions comprising projections, filters, join, and aggregation operations. We shall describe the current coverage of the rewriting algorithm, how Hive controls important aspects of the life cycle of the materialized views such as the freshness of their data, and outline interesting directions for future improvements. We include an experimental evaluation highlighting the benefits that the usage of materialized views can bring to the execution of Hive workloads.
Speaker
Jesus Camacho Rodriguez, Member of Technical Staff, Hortonworks
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)Hyojun Jeon
NDC18에서 발표하였습니다. 현재 보고 계신 슬라이드는 2부 입니다.(총 2부)
- 1부 링크: https://goo.gl/3v4DAa
- 2부 링크: https://goo.gl/wpoZpY
(SlideShare에 슬라이드 300장 제한으로 2부로 나누어 올렸습니다. 불편하시더라도 양해 부탁드립니다.)
Accelerating query processing with materialized views in Apache HiveDataWorks Summit
Over the last few years, the Apache Hive community has been working on advancements to enable a full new range of use cases for the project, moving from its batch processing roots towards a SQL interactive query answering platform. Traditionally, one of the most powerful techniques used to accelerate query processing in data warehouses is the precomputation of relevant summaries or materialized views.
This talk presents our work on introducing materialized views and automatic query rewriting based on those materializations in Apache Hive. In particular, materialized views can be stored natively in Hive or in other systems such as Druid using custom storage handlers, and they can seamlessly exploit new exciting Hive features such as LLAP acceleration. Then the optimizer relies in Apache Calcite to automatically produce full and partial rewritings for a large set of query expressions comprising projections, filters, join, and aggregation operations. We shall describe the current coverage of the rewriting algorithm, how Hive controls important aspects of the life cycle of the materialized views such as the freshness of their data, and outline interesting directions for future improvements. We include an experimental evaluation highlighting the benefits that the usage of materialized views can bring to the execution of Hive workloads.
Speaker
Jesus Camacho Rodriguez, Member of Technical Staff, Hortonworks
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)Hyojun Jeon
NDC18에서 발표하였습니다. 현재 보고 계신 슬라이드는 2부 입니다.(총 2부)
- 1부 링크: https://goo.gl/3v4DAa
- 2부 링크: https://goo.gl/wpoZpY
(SlideShare에 슬라이드 300장 제한으로 2부로 나누어 올렸습니다. 불편하시더라도 양해 부탁드립니다.)
Zeppelin 노트북, 화재 뉴스 기사 데이터셋:
https://github.com/uosdmlab/playdata-zeppelin-notebook
2016년 10월 14일(금)에 "마루180"서 열린 "데이터야놀자"에서 진행한 세션 "Spark & Zeppelin을 활용한 머신러닝 실전 적용기" 슬라이드입니다. 많은 분들이 빠르고 쉽게 Spark ML을 시작했으면 하는 마음에서 발표를 준비했습니다! 실제로 Spark와 Zeppelin으로 머신러닝을 하며 발생한 문제점과 해결법, 간단한 텍스트 분류 예제와 성능 향상 사례 등의 내용을 담았습니다. 세션에서는 제플린 노트북과 슬라이드를 번갈아가며 진행하였는데, 노트북이 궁금하신 분들은 GitHub에 올려두었으니 직접 실행해보세요^^ (정말 열심히 정리했습니다 ㅠㅠ)
서울시립대학교 데이터마이닝연구실 김태준
*(SlideShare에서도 배달의민족 도현체 쓰고 싶어요)
[Blt]ai patent strategy(ver2.0) 20181029 karl_final태균 정
인공지능 특허전략을 의료 딥러닝 분야 특허를 중심으로 제시합니다.
1.우리나라 최초 의료기기등록 인공지능 소프트웨어의 특허 By BLT
2.딥러닝/인공지능 특허를 받을 수 있을까?
3.딥러닝 특허의 유형은?
-딥러닝 알고리즘 자체특허, 딥러닝 보조기술 특허, 딥러닝 활용기술특허
4.의료 딥러닝 업체 사례 기반의 '의료 딥러닝 특허분야' 분석
-IBM Watson, Lunit, Hutom, Zebra Medical Vision, Arterys
5.빅데이터/딥러닝 비즈니스 시 유의사항
-오픈소스 사용시 유의사항
-클라우드 기반 서비스 시 유의사항
-특허포트폴리오 구축의 필요성
-특허 침해 입증 방안
-의료기기 인증과 특허 간의 관계
5. 1.1 Deep Learning과 의료 AI
Explaining Deep Learning in One Sentence
You could think of Deep Learning as the building of learning
machines, say pattern recognition systems or whatever, by
assembling lots of modules or elements that all train the same
way.
Deep learning is a branch of machine learning based on a set
of algorithms that attempt to model high level abstractions in
data by using a deep graph with multiple processing layers,
composed of multiple linear and non-linear transformations.
IEEE Spectrum, Feb. 2015
7. 1.1 Deep Learning과 의료 AI
데이터 기반의 일관적이고 객관적인 특징 학습 및 분석 방법
1. 데이터가 많고
2. 좋은 데이터를 이용해 학습하면
3. 좋은 결과가 나온다.
4. 좋은 데이터란?
8. 병원에는
1. 데이터가 많고
2. 좋은 데이터를 이용해 학습하면
3. 좋은 결과가 나온다.
4. 과연 좋은 데이터인가?
1.1 Deep Learning과 의료 AI
9. 의료 AI
1. 특정 병변의 검출 및 분류
2. 인체 기관의 세부 구조 분할
3. 유사 영상 검색 등
1.1 Deep Learning과 의료 AI
10. Automated Detection of Diabetic Retinopathy
1. 당뇨성 망막증(DR)은 실명의 가장 빠른 성장 원인
2. DR은 초기에 찾으면 치료 가능
3. 병변의 유형에 의해 DR의 심각도를 판단
1.2 의료 AI의 실제 사례
V. Gulshan et.al., JAMA, 2016
11. Automated Detection of Diabetic Retinopathy
1. 128,000장의 Fundus 이미지를
2. 54명의 의사가
3. 한 이미지에 3-7명이 Labeling
4. 안과 의사에 버금가는 성능
1.2 의료 AI의 실제 사례
V. Gulshan et.al., JAMA, 2016
18. 2.1 Labeling tool 설명
Dental Panorama X-ray Labeling tool
1. 26개의 카테고리와 81개의 질병(색으로 구분)
2. DICOM Viewer 기능(Viewer, Windowing, …)
3. 그리기 도구(2-layer)
4. 결과는 Labeling image와 선택된 정보를 저장
19. 2.1 Labeling tool 설명
Lung CT Nodule Labeling tool
1. 3D DICOM Viewer(Stack scroll, Windowing, Zoom, …)
2. Nodule의 심각한 정도를 색으로 표현
3. Nodule의 크기 재는 도구
4. 전공의/전문의로 나누어 Labeling
21. 2.1 Labeling tool 설명
Fundus Labeling tool
1. DICOM Viewer(Viewer, Windowing, Zoom, …)
2. 좌안/우안 구분 및 Dist/Fovea 자동 설정
3. 8개의 구획을 나누어 병이 있는 구획 Labeling
4. 이미지 한장당 세 명의 의사가 Labeling
22. 2.2 공통적으로 필요한 기능
Image viewer
1. *.dcm file reader (dicomParser.js)
2. Windowing (cornerstone.js)
3. Zoom / Pan / Length (cornerstoneTools.js)
4. Annotation Tools
5. Colors
6. Undo / Redo
7. Image Save(2-Layer)
8. 태블릿 PC 지원
23. 2.2 공통적으로 필요한 기능
DICOM file
1. 의료용 디지털 영상 및 통신 표준
2. 환자 이름, 환자 ID, raw data, 검사 날짜 등
(약 4000개 정도가 있음)
3. (4자리 16진수, 4자리 16진수)를 key로 가짐
0 (128 bytes)
DICM (4 bytes)
Header
Data Element
Value length
Value representation
Tag ( 0x????, 0x????)
Value field
Data Element
Value length
Value representation
Tag ( 0x????, 0x????)
Value field
Data set
24. 2.2 공통적으로 필요한 기능
dicomParser.js
1. 다이콤 표준문서(http://dicom.nema.org/standard.html)를 보고
2. 원하는 데이터의 Tag를 찾아 파싱
25. 2.2 공통적으로 필요한 기능
Windowing (Window width, center)
1. 인체의 각 조직과 기관은 특정 값을 갖고 있음 (e.g. 물=0, 공기=-1000, 뼈
=1000[HU])
2. 영상에서 보고자 하는 조직을 기준으로 하여(Window Center)
3. 얼마만큼(Window Width)의 값을 볼 것인지 정하는 것
4. 임상에서 일반적으로 사용하는 Windowing 값이 존재
• 폐실질 : 1,000~1,700 / -700~-800
• 뼈 : 1,000~2,000 / 200~300
• 뇌실질 : 80~100 / 0~30
• 흉부종격 : 400~500 / 40 ~ 60
26. 2.2 공통적으로 필요한 기능
Windowing (Window width, center)
1. DICOM파일에서의 Brightness / Contrast 조정
2. 일반적으로 마우스 오른쪽 버튼 이용 (OsiriX)
3. 이미지의 값을 계산 및 변경하는데 오래걸림
4. WebGL을 이용해 개선!
27. 2.2 공통적으로 필요한 기능
Annotation Tools
1. Brush
2. Elliptical ROI
3. Rectangle ROI
4. Probe
5. Eraser
28. 2.2 공통적으로 필요한 기능
약속
1. Labeling data format
2. 한 데이터에 몇 명이 Labeling을 할 것인지
3. 단축키
29. 2.2 공통적으로 필요한 기능
Dashboard
1. 관리자의 관리용
2. 사용자의 경쟁심리 유도
30. 2.3 부위 별로 다르게 필요한 기능
CT 3D DICOM Image viewer
1. DICOM header 중 instance number 기준으로 정렬
2. 첫 이미지 로드 후 나머지 이미지 load and cache
3. Mouse 혹은 방향키로 scroll
4. 슬라이드 별 Labeling을 해야하기 때문에 다음과 같이 저장
31. 2.3 부위 별로 다르게 필요한 기능
전공의와 전문의의 분리
1. 대부분의 Labeling은 대학병원 의사분들이 함
2. 먼저 전공의 Level에서 Labeling을 함
3. 전공의가 끝낸 이미지에 대해 다시 한번 전문의가 확인
4. 이 때, 전공의가 Labeling한 정보는 그대로 Copy
5. 전문의가 수정하여 저장하면 새로운 데이터가 됨
6. 따라서 한 이미지에 대해 전공의/전문의 두 Label이 남음
7. 학습에는 전문의 데이터를 사용
32. 2.3 부위 별로 다르게 필요한 기능
Fundus region 나누기
1. Disk와 Fovea가 기준점(이 둘은 학습을 통해 자동으로 찾음) Disk / Fovea
33. 2.3 부위 별로 다르게 필요한 기능
Fundus region 나누기
2. Disk-Fovea거리의 2/3, 2/5의 반지름을 갖는 두 원을 그리고
3. 수학으로 두 원의 교점을 찾은 뒤
4. 나머지 선들을 그린다.
34. 2.3 부위 별로 다르게 필요한 기능
Fundus 선택한 region 판단
1. 선택한 좌표가 두 원 안에 존재하는지 먼저 확인
2. 선택한 좌표와 가까운 두 점과의 ccw를 통해 판단
Counter
Clock Wise
Clock Wise
선택한 좌표
선택한 좌표
P1
P2
35. 2.3 부위 별로 다르게 필요한 기능
Fundus 선택한 region 색채우기
1. 선택한 지역의 둘레를 그린 후 색을 채운다.
2. 이 때, 원의 각도를 삼각함수를 이용해 구한다.
3. (노가다)
theta
37. 3.1 왜 설치 및 관리가 어려운가
클라우드
1. Labeling을 위해서는 데이터가 있어야함
2. 병원의 데이터는 환자 데이터(!)
3. IRB를 받더라도 외부로 반출되면 안됨
4. 따라서 클라우드 서비스는 불가능
38. 3.1 왜 설치 및 관리가 어려운가
환경
1. 병원은 내부망을 씀
2. 내부망은 외부 인터넷 연결이 되지 않음(!)
3. 따라서 외부에서 접속하여 관리 할 수 없음
4. 운영체제가 다 다름
39. 3.2 설치 및 관리하기
Docker
1. 개발 환경이 단일화 된다는 것은 신경 쓸 것이 많이 사라짐을 의미
2. Docker image 덮어 씌움으로 해결되는 쉬운 업데이트
3. 같은 Labeling tool로 여러 system을 만들기가 수월함
(e.g. 정상 이미지가 많은 시스템, 녹내장 시스템, …)
40. 3.2 설치 및 관리하기
설치 파일 전달
1. 외부망을 전혀 연결 할 수 없는 최악의 경우
2. Install Shield를 만들어 배포 (간편함)
3. 외부 인터넷이 안되는데 .. 업데이트는 ?
4. 무분별한 Copy를 확인 할 방법이 없음
41. 3.2 설치 및 관리하기
직접 설치 및 관리
1. 외부망을 전혀 연결 할 수 없는 최악의 경우
2. Labeling tool을 docker image로 만들어서
3. USB에 담아 직접 설치한다.
4. 업데이트도 직접 가서 한다.
5. 학습도 가서 한다..
42. 3.2 설치 및 관리하기
VPN + PC
1. GPU PC를 병원 내부에 둠
2. VPN을 이용해 외부에서 접속
3. 설치 및 관리를 전부 VPN을 연결한 상태에서 함
(Packet log를 통해 데이터를 빼가는지 확인 가능)
4. 업데이트도 용이하고
5. Labeling data 학습도 쉽게 가능