Skip to content

Instantly share code, notes, and snippets.

View tonyf's full-sized avatar

tony tonyf

View GitHub Profile
@tonyf
tonyf / datamodule.py
Last active June 3, 2024 18:14
LightningDataModule + TorchData DataPipe & DataLoader2
from typing import Any, Dict
import lightning as L
from torchdata.dataloader2 import DataLoader2
from torchdata.dataloader2.adapter import Adapter
from torchdata.dataloader2.reading_service import (
ReadingServiceInterface,
)
from torchdata.datapipes.iter import IterDataPipe
@tonyf
tonyf / example.xml
Last active December 19, 2019 21:57
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
<property name="cacheConfiguration">
<list>
<!-- Partitioned cache example configuration (Atomic mode). -->