Comments (3)
A proposal for implementing this:
- <main_file> (supplied by the
--main
option tosmt run
, for example) may be a space-separated list of scripts smt run
may have any number of arguments. These are treated as follows:
a. test whether the arg is the path to a file. if so, try to interpret it as a parameter file. If this can't be done, it is taken to be a generic "input file", and stored in a new attribute ofRecord
,inputs
. We should perhaps store the md5sum of the file as well as its path, to catch the case that a different file is later created with the same name.
b. any args that look like "param=val" are treated as at present, and added to the parameter file
c. anything else is assumed to be an argument of the <main_file> script, passed on unchanged during launch, and added toRecord.inputs
.
I can think of two possibilities for storing inputs:
- Put both input files (as
datastore.DataFile
objects) and script arguments in the same place:Record.inputs
- Have separate attributes:
Record.input_files
andRecord.script_arguments
I think option (1) is best, as it preserves the argument order. We can always provide the extra attributes in option (2) as properties giving views of Record.inputs
.
We can probably generalize "check if it is a file" to "check if it exists in a DataStore
" to support inputs that come from online databases, etc.
Trac comment by apdavison on 07-19-2010 at 16:47
from sumatra.
Multiple arguments for smt run
has been done in [177:6d960b24419c], although I didn't go for the Record.inputs
idea in the end since it involved a lot more hassle in the DjangoRecordStore
backend to keep the ordering right. Instead we have Record.input_data
and Record.script_arguments
. The latter is just a string.
Multiple main files remains to do.
Trac comment by apdavison on 07-20-2010 at 19:20
from sumatra.
Support for multiple main files implemented in [210:2498dcbd8da1], although the implementation is rather simplistic and assumes no spaces in file names.
Trac comment by apdavison on 02-14-2011 at 15:30
from sumatra.
Related Issues (20)
- Generic dependency capture with CDE or ReproZip
- Allow installing optional dependencies easily with pip HOT 4
- Duplicate labels can arise if commands run in parallel HOT 1
- Add command `smt view` to show a single record on the command line.
- Implement `patch()` for the other version control systems
- Update to support the most recent version of Django
- Support multiple extensions in the `build_parameters()` function
- Allow changing record store in the situation when the old store is not available
- Relax/remove the requirement that a Sumatra project is in a version controlled directory. HOT 1
- Option to track input data
- Wrong license on the website HOT 1
- Output at runtime HOT 2
- Replication of records - Using Sumatra to publish computational projects HOT 1
- Using sumatra with python -m (without main file) HOT 1
- Not an issue just a clarifying question HOT 7
- sumatra.parameters.NTParameterSet cannot be modified after unpickling
- async failure in Python 2.7
- Add support for Docker HOT 4
- Outputs and labels mismatch when jobs are launched in batch HOT 2
- database is locked when launching multiple jobs HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sumatra.