Skip to content

Cant start training by following instructions from docs #259

@lzivadinovic

Description

@lzivadinovic

Hi!
I'm trying to use this code by running provided examples from documentation. First problem was that url that is hardcoded here was invalid github link, and that variable should be changed to something like this

_example_data_url = "https://raw.githubusercontent.com/djones1040/SALTShaker/main/examples/saltshaker-latest-training.tgz"

After downloading training data and unpacking it, when i run trainsalt -c traingradient.conf from provided file, it says it cant find kcor/*fits files. Even if configuration in traingradient.conf file uses relative paths to kcor files, it looks its always appended to init_rootdir variable, here is full error for this command

(saltshaker) (anaconda3-2023.07-2) akaknjo@prometej:~/saltshaker-latest-training$ trainsalt -c traingradient.conf 
kcor file kcor/kcor_CFA4p1.fits does not exist.   Checking /home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/data/kcor
Exception raised during initialization
Traceback (most recent call last):
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/training/TrainSALT.py", line 1125, in main
    self.kcordict=readutils.rdkcor(self.surveylist,self.options)
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/util/readutils.py", line 275, in rdkcor
    raise RuntimeError('kcor file %s does not exist'%kcorfile)
RuntimeError: kcor file /home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/data/kcor/kcor/kcor_CFA4p1.fits does not exist
Traceback (most recent call last):
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/training/TrainSALT.py", line 1125, in main
    self.kcordict=readutils.rdkcor(self.surveylist,self.options)
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/util/readutils.py", line 275, in rdkcor
    raise RuntimeError('kcor file %s does not exist'%kcorfile)
RuntimeError: kcor file /home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/data/kcor/kcor/kcor_CFA4p1.fits does not exist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/bin/trainsalt", line 11, in <module>
    rt.main()
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/training/TrainSALT.py", line 1295, in main
    salt.main()
  File "/home/raid_array/polaznik/akaknjo/.pyenv/versions/anaconda3-2023.07-2/envs/saltshaker/lib/python3.10/site-packages/saltshaker/training/TrainSALT.py", line 1182, in main
    raise RuntimeError("Training exited unexpectedly")
RuntimeError: Training exited unexpectedly

It looks like it's requiring data to be in site-packages where lib is actually installed, not in random directory that you want to use. Is there workaround for this or should i just copy data there and run training from that location?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions