Skip to content

Commit

Permalink
#11 - Add main conference papers
Browse files Browse the repository at this point in the history
- Upgrade tutorials
- Fix calendar
  • Loading branch information
jcklie committed Oct 31, 2020
1 parent e3a0aae commit 7f71736
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 31 deletions.
19 changes: 19 additions & 0 deletions miniconf/load_site_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,23 @@ def parse_session_time(session_time_str: str) -> datetime:


def build_tutorials(raw_tutorials: List[Dict[str, Any]]) -> List[Tutorial]:
def build_tutorial_blocks(t: Dict[str, Any]) -> List[SessionInfo]:
blocks = compute_schedule_blocks(t["sessions"])
result = []
for i, block in enumerate(blocks):
min_start = min([t["start_time"] for t in block])
max_end = max([t["end_time"] for t in block])

result.append(
SessionInfo(
session_name=f"T-Live Session {i+1}",
start_time=min_start,
end_time=max_end,
link="",
)
)
return result

return [
Tutorial(
id=item["UID"],
Expand All @@ -666,11 +683,13 @@ def build_tutorials(raw_tutorials: List[Dict[str, Any]]) -> List[Tutorial]:
session_name=session.get("name"),
start_time=session.get("start_time"),
end_time=session.get("end_time"),
hosts=session.get("hosts", ""),
livestream_id=session.get("livestream_id"),
zoom_link=session.get("zoom_link"),
)
for session in item.get("sessions")
],
blocks=build_tutorial_blocks(item),
virtual_format_description=item["info"],
)
for item in raw_tutorials
Expand Down
32 changes: 23 additions & 9 deletions miniconf/site_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def time_string(self) -> str:
@property
def start_time_string(self) -> str:
start_time = self.start_time.astimezone(pytz.utc)
return start_time.strftime("%Y-%m-%dT%H:%M:%S UTC")
return start_time.strftime("%Y-%m-%dT%H:%M:%S")

@property
def end_time_string(self) -> str:
end_time = self.end_time.astimezone(pytz.utc)
return end_time.strftime("%Y-%m-%dT%H:%M:%S UTC")
return end_time.strftime("%Y-%m-%dT%H:%M:%S")

@property
def session(self) -> str:
Expand All @@ -44,11 +44,14 @@ def session(self) -> str:
if self.session_name.startswith("S-"):
# social event sessions
return f"{self.session_name[2:]}: {start_date}"
if self.session_name.startswith("T-"):
# workshop sessions
return f"{self.session_name[2:]}: {start_date}"
if self.session_name.startswith("W-"):
# workshop sessions
return f"{self.session_name[2:]}: {start_date}"
if self.session_name.endswith("z") or self.session_name.endswith("g"):
# workshop sessions
# paper sessions
return f"{self.session_name[:-1]}: {start_date}"

return f"Session {self.session_name}: {start_date}"
Expand Down Expand Up @@ -156,28 +159,38 @@ class TutorialSessionInfo:
session_name: str
start_time: datetime
end_time: datetime
hosts: str
livestream_id: str
zoom_link: str

@property
def time_string(self) -> str:
return "({}-{} GMT)".format(
self.start_time.strftime("%H:%M"), self.end_time.strftime("%H:%M")
)
start = self.start_time.astimezone(pytz.utc)
end = self.end_time.astimezone(pytz.utc)
return "({}-{} UTC)".format(start.strftime("%H:%M"), end.strftime("%H:%M"))

@property
def start_time_string(self) -> str:
return self.start_time.strftime("%Y-%m-%dT%H:%M:%S")
start_time = self.start_time.astimezone(pytz.utc)
return start_time.strftime("%Y-%m-%dT%H:%M:%S")

@property
def end_time_string(self) -> str:
return self.end_time.strftime("%Y-%m-%dT%H:%M:%S")
end_time = self.end_time.astimezone(pytz.utc)
return end_time.strftime("%Y-%m-%dT%H:%M:%S")

@property
def session(self) -> str:
start_date = f'{self.start_time.strftime("%b")} {self.start_time.day}'
start = self.start_time.astimezone(pytz.utc)
start_date = f'{start.strftime("%b")} {start.day}'
return f"{self.session_name}: {start_date}"

@property
def day(self) -> str:
start = self.start_time.astimezone(pytz.utc)
start_date = f'{start.strftime("%b")} {start.day}'
return start_date


@dataclass(frozen=True)
class Tutorial:
Expand All @@ -191,6 +204,7 @@ class Tutorial:
prerecorded: Optional[str]
rocketchat_channel: str
sessions: List[TutorialSessionInfo]
blocks: List[SessionInfo]
virtual_format_description: str


Expand Down
18 changes: 18 additions & 0 deletions sitedata/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,27 @@
- name: Part 1
start_time: 2020-11-19 15:00:00+00:00
end_time: 2020-11-19 16:30:00+00:00
hosts: Eric Wallace, Matt Gardner and Sameer Singh
livestream_id: 42
- name: QA 1
start_time: 2020-11-19 16:30:00+00:00
end_time: 2020-11-19 17:00:00+00:00
hosts:
livestream_id: 42
- name: BREAK
start_time: 2020-11-19 17:00:00+00:00
end_time: 2020-11-19 17:30:00+00:00
hosts:
livestream_id: 42
- name: Part 2
start_time: 2020-11-19 17:30:00+00:00
end_time: 2020-11-19 19:00:00+00:00
hosts:
livestream_id: 42
- name: QA 2
start_time: 2020-11-19 19:00:00+00:00
end_time: 2020-11-19 19:30:00+00:00
hosts:
livestream_id: 42
website: https://www.ericswallace.com/interpretability
- UID: T2
Expand All @@ -60,10 +65,12 @@
- name: Q&A
start_time: 2020-11-19 09:00:00+00:00
end_time: 2020-11-19 10:00:00+00:00
hosts: Preslav Nakov and Giovanni Da San Martino
livestream_id: 42
- name: Q&A
start_time: 2020-11-19 16:00:00+00:00
end_time: 2020-11-19 17:00:00+00:00
hosts:
livestream_id: 42
website: https://propaganda.qcri.org/emnlp20-tutorial
- UID: T3
Expand All @@ -89,10 +96,13 @@
- name: Q&A
start_time: 2020-11-19 17:00:00+00:00
end_time: 2020-11-19 18:00:00+00:00
hosts: Gabriel Ilharco, Cesar Ilharco, Iulia Turc, Tim Dettmers, Felipe Ferreira,
Kenton Lee
livestream_id: 42
- name: Q&A
start_time: 2020-11-20 00:00:00+00:00
end_time: 2020-11-20 01:00:00+00:00
hosts:
livestream_id: 42
- UID: T4
title: Machine Reasoning for Knowledgeable, Explainable and Inferable Models
Expand All @@ -119,10 +129,12 @@
- name: Q&A
start_time: 2020-11-19 09:00:00+00:00
end_time: 2020-11-19 10:00:00+00:00
hosts: Nan Duan, Duyu Tang and Ming Zhou
livestream_id: 42
- name: Q&A
start_time: 2020-11-20 01:00:00+00:00
end_time: 2020-11-20 02:00:00+00:00
hosts:
livestream_id: 42
- UID: T5
title: Representation, Learning and Reasoning on Spatial Language for Down-stream
Expand All @@ -140,10 +152,12 @@
- name: Q&A
start_time: 2020-11-20 17:00:00+00:00
end_time: 2020-11-20 18:00:00+00:00
hosts: Parisa Kordjamshidi, James Pustejovsky and Marie-Francine Moens
livestream_id: 42
- name: Q&A
start_time: 2020-11-21 00:00:00+00:00
end_time: 2020-11-21 01:00:00+00:00
hosts:
livestream_id: 42
website: ' https://spatial-language-tutorial.github.io '
- UID: T6
Expand All @@ -162,10 +176,12 @@
- name: Q&A
start_time: 2020-11-20 18:00:00+00:00
end_time: 2020-11-20 19:00:00+00:00
hosts: Liang Huang, Colin Cherry, Mingbo Ma, Naveen Arivazhagan and Zhongjun He
livestream_id: 42
- name: Q&A
start_time: 2020-11-21 01:00:00+00:00
end_time: 2020-11-21 02:00:00+00:00
hosts:
livestream_id: 42
- UID: T7
title: The Amazing World of Neural Language Generation
Expand Down Expand Up @@ -193,8 +209,10 @@
- name: Q&A
start_time: 2020-11-20 19:00:00+00:00
end_time: 2020-11-20 20:00:00+00:00
hosts: Yangfeng Ji, Antoine Bosselut, Thomas Wolf and Asli Celikyilmaz
livestream_id: 42
- name: Q&A
start_time: 2020-11-21 01:00:00+00:00
end_time: 2020-11-21 02:00:00+00:00
hosts:
livestream_id: 42
6 changes: 3 additions & 3 deletions static/js/time-extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ add_local_tz = (selector) => {
const t = $(this).text();
const res = regex_time.exec(t);
if (res) {
const start_time = moment.utc(`2020-07-05 ${res[1]}`);
const end_time = moment.utc(`2020-07-05 ${res[2]}`);
const start_time = moment.utc(`2020-10-16 ${res[1]}`);
const end_time = moment.utc(`2020-10-20 ${res[2]}`);
const local_start = start_time.tz(guess_tz);
const local_start_and_tz = start_time.format("HH:mm");
const local_end = end_time.tz(guess_tz);
Expand All @@ -33,7 +33,7 @@ add_local_tz = (selector) => {
start_dd_str = `(${start_dd}d)`;
}
$(this).text(
`(${res[1]}-${res[2]} ${res[3]} / ${local_start_and_tz}${start_dd_str}-${local_end_and_tz}${end_dd_str})`
`${res[1]}-${res[2]} ${res[3]} / ${local_start_and_tz}${start_dd_str}-${local_end_and_tz}${end_dd_str}`
);
}
});
Expand Down
10 changes: 4 additions & 6 deletions templates/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,9 @@ <h4>
</span>
</div>
<div class="mx-4 text-left card-subtitle">
<p>{{tutorial.abstract|safe}}</p>
<br/>

{% for session in tutorial.sessions %}

{% for session in tutorial.blocks %}
<div class="m-3 text-center">
{{session.session}}
<span class="session_times">{{session.time_string}}</span>
Expand Down Expand Up @@ -353,7 +352,7 @@ <h4>
let calendarNames = Array("google", "off365", "outlook", "ical");

{% for tutorial in tutorials %}
{% for session in tutorial.sessions %}
{% for session in tutorial.blocks %}
// create a calendar by hand
ouicalData = addToCalendarData({
options: {
Expand Down Expand Up @@ -458,8 +457,7 @@ <h6 class="text-muted font-italic">
{% for session in sessions %}
<div class="text-center text-muted text-monospace">
<div class="paper-session-times">
{{session.session}}
<span class="session_times">{{session.time_string}}</span>
<span>{{session.session}}, </span><span class="session_times">{{session.session}} {{session.time_string}}</span>

{% if session.link %}
<a href="{{session.link}}" target="_blank" class="card-link">
Expand Down
2 changes: 1 addition & 1 deletion templates/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h5>Schedule</h5>
<h5>{{ day }}</h5>
<ul>
{% for (time_string, label) in zooms %}
<li> <span class="zoom_times">{{ time_string }}</span> {{ label }} </li>
<li> <span class="zoom_times">{{ time_string }}</span>: {{label }} </li>
{% endfor %}
</ul>
{% endfor %}
Expand Down
49 changes: 37 additions & 12 deletions templates/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ <h3 class="card-subtitle mb-2 text-muted text-center">
<a class="card-link" data-toggle="collapse" role="button" href="#details">
Description
</a>

{% if tutorial.sessions %}
<a class="card-link" data-toggle="collapse" role="button" href="#schedule">
Schedule
</a>
{% endif %}

{% if tutorial.website %}
<a href="{{tutorial.website}}" target="_blank" class="card-link">
Website
Expand All @@ -31,21 +38,10 @@ <h3 class="card-subtitle mb-2 text-muted text-center">
Material
</a>
{% endif %}

{% if tutorial.id == 'T7' %}
<a href="https://docs.google.com/document/d/1WUerIY4MKuKEmvWR2OeB_oJCSBl3k4Q7KWwNzm5HYhs/view" target="_blank" class="card-link">
Tutorial Worksheet
</a>
{% endif %}
{% if tutorial.id == 'T1' %}
<a href="https://www.dory.app/c/google.com/aaabb999_acl-20-interpretability-tutorial/questions" target="_blank" class="card-link">
Question and Discussion Topic Collection via Dory
</a>
{% endif %}
</div>

{{ components.live_sessions(
tutorial.sessions,
tutorial.blocks,
tutorial.title,
"https://virtual.acl2020.org/tutorial_" + tutorial.id + ".html",
false) }}
Expand All @@ -65,6 +61,35 @@ <h3 class="card-subtitle mb-2 text-muted text-center">
</div>
</div>

<!-- Schedule -->
{% if tutorial.sessions %}
<div id="schedule" class="collapse" aria-labelledby="schedule">
<div class="card-body">
<table class="table table-bordered table-striped" style="font-size: small;">
<thead>
<tr>
<th scope="col" style="width: 30%;">Time</th>
<th scope="col" style="width: 40%;">Event</th>
<th scope="col">Hosts</th>
</tr>
</thead>
<tbody>
{% for event in tutorial.sessions %}
<tr>
<td>
{{event.day}}, <span class="session_times">{{event.time_string}}</span>
</td>
<td scope="row">{{event.session_name}}</td>
<td style="white-space: pre-wrap;">{{event.hosts}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
<script src="static/js/time-extend.js"></script>

<div class="container" style="background-color:white; padding: 0px;">
<div class="row m-2">
<div class="col-md-12 col-xs-12 my-auto p-2" >
Expand Down

0 comments on commit 7f71736

Please sign in to comment.