Skip to content

Repository for SFH inference hackathon at AstroInfo 2021

License

Notifications You must be signed in to change notification settings

EiffL/sfh-inference-hackathon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulation-based Star Formation History Inference Hackathon

forthebadge forthebadge forthebadge

Repository for SFH inference hackathon at AstroInfo 2021.

Proposed by: Marc Huertas-Company, Francois Lanusse, Alexandre Boucaud

image

See this issue to get started.

How to get started on Jean-Zay

  1. Log on the machine

  2. Clone this repo

git clone https://github.com/EiffL/sfh-inference-hackathon.git
  1. Load the environment
module load tensorflow-gpu/py3/2.6.0
  1. Start an interactive session
srun --ntasks=1 --cpus-per-task=10 --gres=gpu:1 --hint=nomultithread --time=06:00:00 -A wvb@gpu --pty bash
  1. Start a jupyter lab
idrlab --notebook-dir=$PWD

And then follow the link to https://idrvprox.idris.fr, log in, and click on your submitted job.

Then you can try to load the intro notebook

Code organisation

There is a sfh module whose code lies in code/sfh. The code that is used in several notebooks, or code that shall be ran outside of notebooks, shall be included in it.

One way to install it for your environment on Jean Zay you can do:

cd sfh-inference-hackathon
pip install --user -e .

To customize the location of the data, it is possible to use two environment variables:

  • TNG100_DATA_PATH contains the path to the TNG100 data.
  • TFDS_DATA_DIR contains the path to the tensorflow datasets.

And then use the function sfh.datasets.setup_environment. On Jean Zay, there's no need to define these two environment variables and the function will set them automatically.

from sfh.datasets import setup_environment, tng100, eagle
import tensorflow_datasets as tfds

setup_environment()
dset_tng100 = tfds.load('tng100', split='train')
dset_eagle = tfds.load('eagle', split='train')

About

Repository for SFH inference hackathon at AstroInfo 2021

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published